{"action":"created","issue":{"url":"https://api.github.com/repos/harthur/replace/issues/32","labels_url":"https://api.github.com/repos/harthur/replace/issues/32/labels{/name}","comments_url":"https://api.github.com/repos/harthur/replace/issues/32/comments","events_url":"https://api.github.com/repos/harthur/replace/issues/32/events","html_url":"https://github.com/harthur/replace/issues/32","id":26541546,"number":32,"title":"request for contextual address functionality","user":{"login":"akileez","id":4314979,"avatar_url":"https://avatars.githubusercontent.com/u/4314979?v=3","gravatar_id":"","url":"https://api.github.com/users/akileez","html_url":"https://github.com/akileez","followers_url":"https://api.github.com/users/akileez/followers","following_url":"https://api.github.com/users/akileez/following{/other_user}","gists_url":"https://api.github.com/users/akileez/gists{/gist_id}","starred_url":"https://api.github.com/users/akileez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akileez/subscriptions","organizations_url":"https://api.github.com/users/akileez/orgs","repos_url":"https://api.github.com/users/akileez/repos","events_url":"https://api.github.com/users/akileez/events{/privacy}","received_events_url":"https://api.github.com/users/akileez/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2014-01-29T18:27:44Z","updated_at":"2015-04-10T13:34:27Z","closed_at":"2015-04-10T13:34:27Z","body":"sed allows for a contextual address(regex) which selects all of the pattern spaces that match the address. A command with no address selects every pattern space.\r\n\r\nSo, in sed you can do this: \r\n```bash\r\nsed -n '/styles-min/p' file.html\r\n```\r\n which results in say,\r\n\r\n```html\r\n<link rel=\"stylesheet\" href=\"assets/css/styles-min.2ac224ec.css\" />\r\n```\r\n\r\nThis is equivalent to \r\n```bash \r\nsearch 'styles-min' file.html\r\n```\r\n\r\nYou can also do this with sed: \r\n\r\n```bash\r\nsed -n '/styles-min/ s/\\.css/.min.css/p' file.html\r\n```\r\nyielding:\r\n\r\n```html\r\n<link rel=\"stylesheet\" href=\"assets/css/styles-min.2ac224ec.min.css\" />\r\n```\r\nThere is no equivalent in `replace` that does this to my knowledge. Would something like this be possible? Something to the effect of \r\n\r\n```bash\r\nsrep 'styles-min' '\\.css' '.min.css' file.html\r\nor \r\nsrep  '\\.css' '.min.css' --c 'styles-min' file.html\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/harthur/replace/issues/comments/91559277","html_url":"https://github.com/harthur/replace/issues/32#issuecomment-91559277","issue_url":"https://api.github.com/repos/harthur/replace/issues/32","id":91559277,"user":{"login":"akileez","id":4314979,"avatar_url":"https://avatars.githubusercontent.com/u/4314979?v=3","gravatar_id":"","url":"https://api.github.com/users/akileez","html_url":"https://github.com/akileez","followers_url":"https://api.github.com/users/akileez/followers","following_url":"https://api.github.com/users/akileez/following{/other_user}","gists_url":"https://api.github.com/users/akileez/gists{/gist_id}","starred_url":"https://api.github.com/users/akileez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akileez/subscriptions","organizations_url":"https://api.github.com/users/akileez/orgs","repos_url":"https://api.github.com/users/akileez/repos","events_url":"https://api.github.com/users/akileez/events{/privacy}","received_events_url":"https://api.github.com/users/akileez/received_events","type":"User","site_admin":false},"created_at":"2015-04-10T13:34:27Z","updated_at":"2015-04-10T13:34:27Z","body":"closing"}}