JavaScript regex - positive lookahead -- giving me syntax errors

Posted by Tourshi on Stack Overflow See other posts from Stack Overflow or by Tourshi
Published on 2010-05-31T19:09:47Z Indexed on 2010/05/31 19:13 UTC
Read the original article Hit count: 416

Filed under:
|

This piece of regex (?<=href\=")[^]+?(?=#_) is supposed to match everything in a href value except the the hash value and what follows it within the href url. It appears to work fine under Regex debuggers/testers such as http://gskinner.com/RegExr/ but in javascript it appears to produce syntax error. If i remove the < from the (?<=) it works however, that's not the positive lookahead I am looking for.

I am pulling my hair off, as usual, thanks to Regex lol

Please help

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about regex