Javascript regex hangs (using v8)
- by Engwan
Im using this regex to get the contents of a tag in a file.
var regex = new RegExp("<tag:main>((?:.|\\s)*)</tag:main>");
This causes the v8 engine to hang indefinitely.
Now, if I use new RegExp("<tag:main>([\s\S]*)</tag:main>"), all is good.
Anyone have an idea why the first one takes too long?