Regular Expression to match text outside quotes etc...

Posted by Parhs on Stack Overflow See other posts from Stack Overflow or by Parhs
Published on 2010-04-19T13:28:03Z Indexed on 2010/04/19 13:33 UTC
Read the original article Hit count: 169

Filed under:
|
"([\"'])(?:\\\\?+.)*?\\1"

I came up to this regexp to match all quoted strings.. It seems to work great... The problem is how to match the text that isnt inside quotes.. The inverse -negative somehow...

I read the documentation and

(?!(([\"'])(?:\\\\?+.)*?\\1))

doesnt work

© Stack Overflow or respective owner

Related posts about java

Related posts about regex