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!
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!
If you can't find a working regular expression then solve your problem without a regular expression.
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.
Qt Code:
QRexgExp("\"(\\\\\"|[^\"])+\"")To copy to clipboard, switch view to plain text mode
Current Qt projects : QCodeEdit, RotiDeCode
Bookmarks