Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
1 Vastaa
1899 Näkymät

I have written what I think is a very simple regex pattern for matching transactions from my bank feed, but it's not working as expected.

this is the regex for the Label:

PARKING|TRANSPORT|SCENTRE|PARK|TOLL

the intention is to find any transaction that has any of these words in it

  • parking
  • transport
  • scentre Park 
  • toll

this is working for quite a few transactions, however I have a transaction with this label:

THE SPOT WILSON PARKING  RANDWICK CREDIT CARD PURCHASE

and for some reason it's not matching this transaction. any ideas?

Avatar
Hylkää
Tekijä Paras vastaus

I resolved this by creating a regex that matches the entire string, not just part of the string:

^.*(some string|some other string|patternX|patternY).*$


Avatar
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
0
lokak. 24
1429
0
lokak. 23
1998
5
kesäk. 23
4505
0
marrask. 22
1830
1
elok. 22
2977