Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
1853 มุมมอง

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?

อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

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).*$


อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
ต.ค. 24
1407
0
ต.ค. 23
1988
Accounting Reconciliation- แก้ไขแล้ว
5
มิ.ย. 23
4449
0
พ.ย. 22
1824
1
ส.ค. 22
2945