[Kmymoney] Regular expressions

Rhaufed rhaufed at terra.com.br
Sat Oct 10 09:21:21 UTC 2015


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.


 what sintax I use? This is all I need

Thank you

Sent from my iPhone 6+

> On Oct 10, 2015, at 11:04, Koos Pol <kmymoney at pohw.nl> wrote:
> 
> 
> 
> Op 10-10-15 om 08:12 schreef Email Terra Rhaufed:
>> Someone cam help me understand regular expressions and drive me to where I can learn how to put it in use? I feel it can solve a report issue (I need to create a report not available) I have.
> 
> 
> Ciao Rhaufed,
> 
> Regular expressions are like smart filters. In stead of pointing to one specific entry in a list, you are filtering out those your are interested in. And you describe that filter using a regular expression.
> 
> Support you have a list of food items. And you are interested in those that contain the word apple.
> Than you could use the regexp /apple/. This will match all the words containing the word apple:
> - apple
> - apples
> - applejuice
> - pineapple
> 
> If you are only interested in the items that start with the word apple, you adapt the regexp. You add the ^ (carrot). The carrot means: "start at the beginning of the pattern".
> Your regexp now looks like /^apple/.
> This regepx will match the words:
> - apple
> - apples
> - applejuice
> 
> It will not match the word pineapple, as it does not start with apple.
> 
> The reverse is also true: you can use a regexp to match words that end with apple. Than the regexp looks like /apple$/.
> This will match the words:
> - apple
> - pineapple
> 
> 
> Regexp are tricky. They can become pretty cryptic pretty soon. Secondly, there is no one correct regexp implementation. For instance, Perl regular expressions have more tokens and are more powerful. So you need to know in advance which implementation is used.
> 
> For online help I can suggest : http://regexone.com/
> That is the quickest way forward. After that, you just have to do it and learn it the hard way :-D
> 
> Good luck!
> Koos
> 
> 
> 
>   
> _______________________________________________
> KMyMoney mailing list
> KMyMoney at kde.org
> https://mail.kde.org/mailman/listinfo/kmymoney
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kmymoney/attachments/20151010/bafe6096/attachment-0001.html>


More information about the KMyMoney mailing list