I have this regex in Ruby: http://rubular.com/r/eu9LOQxfTj
/<sometag>(.*?)<\/sometag>/im
And it successfully matches input like this:
<sometag>
123
456
</sometag>
Which would return
123
456
However, when I try this in javascript (testing in chrome), it doesn't match anything. Does javascript's multiline flag mean something else?
I want to capture everything non-greedily between two given tags. How can I accomplish this in javascript using regex? Here is a Debuggex Demo
<sometag>(.*?)<\/sometag>

This is not XML parsing.