Magu
8th June 2011, 11:27
Hi all,
I need to implement a "Find" menu as usual (press Ctrl+F ;) ), using QRegExp.
Its easy, also highlighting matches, but I have a (newbie) little problem with LF character. I think I am missing something, for example:
Text to find:
Version S98135-B Linked on
>> >>
>>
>>
...
If I look for an expression as "\t>>", QRegExp finds a tabulator and two extra chars (>>) as requested, but if I look for "\n>>" QRegExp doest not found nothing and returns FALSE. Also, these expressions fails:
"\\n"
"\x000A"
"\x000D\x000A"
"\r\n"
(I know, all of them are the same, and due to this is a Unix system, CRLF has no sense).
What am I doing wrong?
I need to implement a "Find" menu as usual (press Ctrl+F ;) ), using QRegExp.
Its easy, also highlighting matches, but I have a (newbie) little problem with LF character. I think I am missing something, for example:
Text to find:
Version S98135-B Linked on
>> >>
>>
>>
...
If I look for an expression as "\t>>", QRegExp finds a tabulator and two extra chars (>>) as requested, but if I look for "\n>>" QRegExp doest not found nothing and returns FALSE. Also, these expressions fails:
"\\n"
"\x000A"
"\x000D\x000A"
"\r\n"
(I know, all of them are the same, and due to this is a Unix system, CRLF has no sense).
What am I doing wrong?