[Kmymoney] Regular expressions

Koos Pol koos2015 at pohw.nl
Sat Oct 10 10:11:45 UTC 2015



Op 10-10-15 om 11:21 schreef Rhaufed:
> Thank you,
>
> using your example, suppose I'm interested on filtering on those where
>  the word Apple OR the word pineaple are found.
> And if Apple AND pineaple

*/(Apple)|(pineapple)/*

() = grouping
| = OR ; the token "|" only matches one single character. By grouping
the letters of the word, you treat that word as one character.

This regexp will match:
- foo Apple bar
- foo pineapple bar
- foo Apple bar pineapple bar
- foo pineapple bar Apple

Take special care: regexps are matched "first come, first served":
The string "foo pineapple bar Apple" is not matched because of
*/(_Apple_)|(pineapple)/ *but because of */(Apple)|(_pineapple_)/ !*

Koos

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kmymoney/attachments/20151010/72497048/attachment.html>


More information about the KMyMoney mailing list