{"action":"created","issue":{"url":"https://api.github.com/repos/lazd/gulp-replace/issues/64","labels_url":"https://api.github.com/repos/lazd/gulp-replace/issues/64/labels{/name}","comments_url":"https://api.github.com/repos/lazd/gulp-replace/issues/64/comments","events_url":"https://api.github.com/repos/lazd/gulp-replace/issues/64/events","html_url":"https://github.com/lazd/gulp-replace/issues/64","id":116947719,"number":64,"title":"regex replace applies only for first match","user":{"login":"vlio20","id":4542641,"avatar_url":"https://avatars.githubusercontent.com/u/4542641?v=3","gravatar_id":"","url":"https://api.github.com/users/vlio20","html_url":"https://github.com/vlio20","followers_url":"https://api.github.com/users/vlio20/followers","following_url":"https://api.github.com/users/vlio20/following{/other_user}","gists_url":"https://api.github.com/users/vlio20/gists{/gist_id}","starred_url":"https://api.github.com/users/vlio20/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vlio20/subscriptions","organizations_url":"https://api.github.com/users/vlio20/orgs","repos_url":"https://api.github.com/users/vlio20/repos","events_url":"https://api.github.com/users/vlio20/events{/privacy}","received_events_url":"https://api.github.com/users/vlio20/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-14T19:34:23Z","updated_at":"2015-11-14T20:59:50Z","closed_at":"2015-11-14T19:37:37Z","body":"When trying to replace multiple blocks only the first one applies, example of src file:\r\n```\r\n<!-- build-remove-start -->aaaaaa<!-- build-remove-end -->\r\n<!-- build-remove-start -->bbbbbb<!-- build-remove-end -->\r\n````\r\n\r\nTask:\r\n```\r\ngulp.task('build-clear-index-html', () => {\r\n  gulp.src(pathTmp + 'index.html')\r\n    .pipe(replace(/<!-- build-remove-start -->([\\s\\S]*?)<!-- build-remove-end -->/, ''))\r\n    .pipe(gulp.dest(pathDist));\r\n});\r\n```\r\n\r\nResult:  \r\n```\r\n<!-- build-remove-start -->bbbbbb<!-- build-remove-end -->\r\n````\r\n"},"comment":{"url":"https://api.github.com/repos/lazd/gulp-replace/issues/comments/156745729","html_url":"https://github.com/lazd/gulp-replace/issues/64#issuecomment-156745729","issue_url":"https://api.github.com/repos/lazd/gulp-replace/issues/64","id":156745729,"user":{"login":"chebum","id":1398682,"avatar_url":"https://avatars.githubusercontent.com/u/1398682?v=3","gravatar_id":"","url":"https://api.github.com/users/chebum","html_url":"https://github.com/chebum","followers_url":"https://api.github.com/users/chebum/followers","following_url":"https://api.github.com/users/chebum/following{/other_user}","gists_url":"https://api.github.com/users/chebum/gists{/gist_id}","starred_url":"https://api.github.com/users/chebum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chebum/subscriptions","organizations_url":"https://api.github.com/users/chebum/orgs","repos_url":"https://api.github.com/users/chebum/repos","events_url":"https://api.github.com/users/chebum/events{/privacy}","received_events_url":"https://api.github.com/users/chebum/received_events","type":"User","site_admin":false},"created_at":"2015-11-14T20:59:50Z","updated_at":"2015-11-14T20:59:50Z","body":"@vlio20 Could you please clarify how did you fix it?"}}