I am trying to generate regular expression in java to parse financial entities from strings. I need to write a regex in such a way that numbers ending with “.” or “,” should be removed, like
15,
15.
where as if values like
15,303(currency )
15.55(rate)
should be taken.
This should do it:
You can play with it here.