Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • Jerry, thanks for the answer, but please see the edit, in that the search terms might not be bounded by word boundaries. Also, is there a way to get this to work across lines on regexr.com which is where I was testing this? Commented Sep 8, 2017 at 13:06
  • @GlenYates Ok, then I think you can remove them. I added that description at the end so that you could change it yourself if you didn't need them ^^ And I don't like regexr, it doesn't have all the things I believe it should have. I use regex101.com where I can have the s flag to make . match newlines, and there's a new feature there called unit tests that was added since I used it last time that looks useful! xD regex101.com/r/hpQ8Jl/1/tests Commented Sep 8, 2017 at 13:14
  • Please see my hopefully last edit, I can't have specifically the last search term in the middle of what would otherwise be a match, i.e. cat </bird> <dog </bird> should NOT match. Commented Sep 8, 2017 at 14:41
  • @GlenYates Ah, I just saw your comment now. Welp, too late now. Commented Sep 25, 2017 at 16:41