i have
if ( text.endsWith("}") || text.endsWith("};") )
and i want to replace it by
if ( text.indexOf(QRegExp("};?$")) != -1 )
but is not same thing - why?
How make right regExp?
i have
if ( text.endsWith("}") || text.endsWith("};") )
and i want to replace it by
if ( text.indexOf(QRegExp("};?$")) != -1 )
but is not same thing - why?
How make right regExp?
Last edited by evgenM; 12th May 2006 at 12:51.
Curly braces have a special meaning in regexps, try this:Qt Code:
To copy to clipboard, switch view to plain text mode
Last edited by jacek; 12th May 2006 at 14:04. Reason: missing blackslash
And double backslash to escape the backslash in a C string.
lol - i forget (stupid error
thanx all
Last edited by evgenM; 12th May 2006 at 14:24.
Bookmarks