Hi Guys,
I am creating a pattern to match amounts like USD 20000, INR 500 ,EUR 20, GBP 100 etc. with some other currencies followed by some amount. Please see my pattern below:
pattern = [{'ORTH': 'USD', 'OP': '?'},
{'ORTH': 'EUR', 'OP': '?'},
{'ORTH': 'GBP', 'OP': '?'},
{'IS_DIGIT': True}]
I am due to add more currencies but for now just trying with USD, EUR and GBP.
Issue with this pattern is that it will match digits that are not lead by any currency. e.g 1000
Do i need to create separate pattern for each currency type or there is any way to mention that at least one of the the given currency should match in above expression?
Thanks in advance.