{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/logstash/issues/4195","labels_url":"https://api.github.com/repos/elastic/logstash/issues/4195/labels{/name}","comments_url":"https://api.github.com/repos/elastic/logstash/issues/4195/comments","events_url":"https://api.github.com/repos/elastic/logstash/issues/4195/events","html_url":"https://github.com/elastic/logstash/issues/4195","id":117140750,"number":4195,"title":"Cannot replace field with value containing hash at the end","user":{"login":"karolzmuda","id":10550427,"avatar_url":"https://avatars.githubusercontent.com/u/10550427?v=3","gravatar_id":"","url":"https://api.github.com/users/karolzmuda","html_url":"https://github.com/karolzmuda","followers_url":"https://api.github.com/users/karolzmuda/followers","following_url":"https://api.github.com/users/karolzmuda/following{/other_user}","gists_url":"https://api.github.com/users/karolzmuda/gists{/gist_id}","starred_url":"https://api.github.com/users/karolzmuda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karolzmuda/subscriptions","organizations_url":"https://api.github.com/users/karolzmuda/orgs","repos_url":"https://api.github.com/users/karolzmuda/repos","events_url":"https://api.github.com/users/karolzmuda/events{/privacy}","received_events_url":"https://api.github.com/users/karolzmuda/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-16T14:49:06Z","updated_at":"2015-11-16T14:58:32Z","closed_at":null,"body":"I'm using filter with following code:\r\n\r\nif [to_addr] =~ \"^\\d{3}$\" {\r\n  mutate {\r\n    replace => [ \"to_addr\", \"*%{to_addr}#\" ]\r\n  }\r\n}\r\n\r\nWhat is expected:\r\ninput: [to_addr] = 123\r\noutput: [to_addr] = *123#\r\n\r\nWhat is achieved:\r\ninput: [to_addr] = 123\r\noutput: [to_addr] = *123\r\n\r\nIf I add any sign in the filter replace method behind hash the hash sign and added sign are correctly visible in the field value (for example \"%{to_addr}#0\" works as expected)\r\n\r\nIf I use hard-coded number, for example:\r\n\r\nif [to_addr] == \"123\" {\r\n  mutate {\r\n    replace => [ \"to_addr\", \"*123#\" ]\r\n  }\r\n}\r\n\r\nEverything works as expected.\r\nWhat's happening here? Thanks for help."},"comment":{"url":"https://api.github.com/repos/elastic/logstash/issues/comments/157059059","html_url":"https://github.com/elastic/logstash/issues/4195#issuecomment-157059059","issue_url":"https://api.github.com/repos/elastic/logstash/issues/4195","id":157059059,"user":{"login":"ph","id":640,"avatar_url":"https://avatars.githubusercontent.com/u/640?v=3","gravatar_id":"","url":"https://api.github.com/users/ph","html_url":"https://github.com/ph","followers_url":"https://api.github.com/users/ph/followers","following_url":"https://api.github.com/users/ph/following{/other_user}","gists_url":"https://api.github.com/users/ph/gists{/gist_id}","starred_url":"https://api.github.com/users/ph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ph/subscriptions","organizations_url":"https://api.github.com/users/ph/orgs","repos_url":"https://api.github.com/users/ph/repos","events_url":"https://api.github.com/users/ph/events{/privacy}","received_events_url":"https://api.github.com/users/ph/received_events","type":"User","site_admin":false},"created_at":"2015-11-16T14:58:31Z","updated_at":"2015-11-16T14:58:31Z","body":"Which version of logstash you are using? This bug was fixed in 1.5.4 by this PR https://github.com/elastic/logstash/pull/3937\r\n\r\nhttps://github.com/elastic/logstash/blob/master/CHANGELOG.md#154-august-20-2015"}}