QRegExp for matching string between quotes with escaped quotes
I tried to find a QRegExp expression for matching text between quotes with escaped quotes inside, but i couldn't find one. Also, I am a newbie and I can't really figure this out by my own. Any help would be appreciated. Thanks!
Re: QRegExp for matching string between quotes with escaped quotes
If you can't find a working regular expression then solve your problem without a regular expression.
Re: QRegExp for matching string between quotes with escaped quotes
You can find possible partial solutions here under the heading "Strings". Regular expression matching of balanced delimiters can be a very tricky proposition depending on how limited (or not) your input is. Even when you think you have it you can almost certainly find a case that will break it.
Often a non-regex approach is clearer, easier to debug, and comparably fast.
Re: QRegExp for matching string between quotes with escaped quotes
Code:
QRexgExp("\"(\\\\\"|[^\"])+\"")