Hello,
I am trying to match a string within {STRING}.
i tried using the following code:
and i even tried it for a specific word that i know exists, like:
and i also tried:
non of these worked, any ideas on how to do this ?
Printable View
Hello,
I am trying to match a string within {STRING}.
i tried using the following code:
and i even tried it for a specific word that i know exists, like:
and i also tried:
non of these worked, any ideas on how to do this ?
I'm not sure what you're trying to accomplish with the curly braces, but Qt RegExps use them as numeric quantifiers; see the documentation at http://doc.qt.nokia.com/4.5/qregexp.html
There are several different systems of regular expressions, each with its own peculiar syntax. The syntax is not interchangeable, and you need to know which you are using, particularly when venturing beyond the most basic expressions.
thanks wysota, it worked perfect.
i guess the problem was me using this:
Code:
str.indexOf(rx);
the index is always -1.