This forum has been archived. All content is frozen. Please use KDE Discuss instead.

How to use regex in search?

Tags: None
(comma "," separated)
User avatar
jonathanrichards
Registered Member
Posts
6
Karma
0
OS

How to use regex in search?

Sun Aug 14, 2016 6:20 pm
Hi, I've just started with Skrooge, and have imported transactions downloaded from my bank in QIF format. I want to locate all the Operations with a comment containing a date in DD-MM-YYYY form, and was pleased to see regex in the search criteria.
However, my simplest regex for such data, i.e.
Code: Select all
\d{2}-\d{2}-\d{4}
does not produce any matches: the Operations window says
Sub operations corresponding to rule 'Comment regexp '\d{2}-\d{2}-\d{4}''
but there are no records returned.
I also tried the POSIX expression
Code: Select all
[0-3][0-9]-[0-1][0-9]-[1-2][0-9]{3}
which works fine with egrep, but no joy.
What am I doing wrong, please?
Jonathan
User avatar
smankowski
Moderator
Posts
1047
Karma
7
OS

Re: How to use regex in search?

Sun Aug 14, 2016 9:39 pm
Here is the documentation:
http://doc.qt.io/qt-5/qregexp.html

The regexp is created like this:
QRegExp pattern(YouString, Qt::CaseInsensitive, QRegExp::RegExp2);


Skrooge, a personal finances manager powered by KDE
Image - PayPal


Bookmarks



Who is online

Registered users: abc72656, Bing [Bot], daret, Google [Bot], lockheed, Sogou [Bot], Yahoo [Bot]