So, I'm trying to write a regex pattern to match strings, including escaped string delimiters.
What I had initially was this: ".*?(?<!\\)" However, I realised that it would break with a string like this: "here is a string with \"quotes\" and an escaped backslash \\" So I tried tweaking the negative look-behind assertion: ".*?(?<![^\\]\\)" That appears to work as part of a codeless language module, but if you put that pattern into BBEdit's 'find' dialogue then you get an error message complaining that the look-behind assertion is not of a fixed length. Is that a bug, or am I missing something? I think it's a bug, because if the character class is not negated (i.e. just [\\]) then BBEdit is happy. James Harvard PS Just for the record I am now aware that there's an alternative, simpler and probably more robust regex for matching strings with escapes in the (very welcome) CLM tutorial. -- ------------------------------------------------------------------ Have a feature request? Not sure the software's working correctly? If so, please send mail to <[EMAIL PROTECTED]>, not to the list. List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml> List archives: <http://www.listsearch.com/BBEditTalk.lasso> To unsubscribe, send mail to: <[EMAIL PROTECTED]>
