QRegExp: Match double-quoted text
-
wrote on 12 Dec 2011, 14:47 last edited by
Hello guys,
I want to match some quoted text like this "asdfhl"
I tried many Regex Strings but something like "[^"']*" just gives me two quotes, without any text or space between.Any ideas? I recently asked on IRC but nobody seemed to be able to help me. Thanks in advance.
kind regards,
rapidcc -
wrote on 12 Dec 2011, 15:06 last edited by
Probably you need this (at least it works on Perl):
@"([^"']*)"@
-
wrote on 12 Dec 2011, 15:10 last edited by
Thank you very much for this quick reply!
I'm a bit confused because I had used this very regex earlier and it didnt work. However, it works perfectly now.
kind regards,
rapidcc -
wrote on 12 Dec 2011, 15:35 last edited by
[quote author="rapidcc" date="1323702626"]
I'm a bit confused because I had used this very regex earlier and it didnt work. However, it works perfectly now.
[/quote]Please consider that there are slightly differences between regexp engine implementations. That is why most of such implementation are becoming more and more perl-compatible.
In your particular case there was a problem with the atom, that was not indicated.
4/4