[SOLVED] QRegExp doesn't match strings
-
Hello:
I want a regular expression able to catch strings that start with a pair of repeated letters so I wrote the following:
@QRegExp beginWithPair("^(\w)\1+");@
As far as I know It should match this string:
bq. aaarfads
and It doesn't.
What am I doing wrong?
Thanks
-
Hi,
What output do you expect ? And what do you get ?
-
Have a look at the documentation of exactMatch. Your string doesn't match exactly your regexp. If it was "aa" it would.
You should rather use indexIn
-
You're welcome !
Don't forget to update the thread's title by prepending solved so other forum users may know a solution has been found :)