[Qt-interest] QRegExp match end of a string
slayer81 at gmx.de
slayer81 at gmx.de
Wed Feb 2 21:11:35 CET 2011
Am 02.02.2011 21:01:19, schrieb Louis Hoefler <louis.hoefler at gmx.de>:
>I modified the regexp to
>
>QRegExp("sometext.*$")
>
>and now it does work.
Is there possibly a line break in your string after "sometext"?
>
>Greetings Louis
>
>Am 02.02.2011 20:44, schrieb Louis Hoefler:
>> Hello everyone,
>> I try to match string who end with "sometext".
>>
>> I use this QRegExp("sometext$") to do so.
>> Now, I call qstring.contains(regexp)
>> to see weather the regexp matched.
>>
>> Howevery, lines who end with "sometext" return
>> no match, but I do not really understand why.
>>
>> Using this regexp to test for strings who only
>> contain spaces, tabs or nothing works
>> QRegExp("^[\\s\\t]*$")
>>
>> Greetings, Louis
>> _______________________________________________
>> Qt-interest mailing list
>> Qt-interest at qt.nokia.com
>> http://lists.qt.nokia.com/mailman/listinfo/qt-interest
>>
>_______________________________________________
>Qt-interest mailing list
>Qt-interest at qt.nokia.com
>http://lists.qt.nokia.com/mailman/listinfo/qt-interest
>
More information about the Qt-interest-old
mailing list