I'm trying to brush up on my Objective C knowledge and I'm writing a personal HTML page for my notes. I have got a little sidetracked and created a basic Javascript syntax highlighter to highlight the code I'm writing on the page! It's all going well apart from detecting NSStrings. I have used Regex's to detect comments and keywords etc but I just can't figure out how to pickup and highlight the NSString content when there's the possibility of these being escaped like below:
NSString = @"Hello \" world \" string";
So far I have
@"(([^"])*)"
which just stops at the first " character, how can I get it to ignore it if it isn't preceded by a backslash?