I want to match currency with or without any thousand separators and or decimals.
String example
String part = "R4,491.25"; // must be able to match more ex : R12,550,000.60
What i have
if( part.matches("\\R\\d*[.,\\s\\d*]+")){
System.out.println("C [" + part + "]");
}
Found this Regex for number with decimals and thousand separator and Python regex to match currency with or without comma or decimal
But neither accomplishes what i need . in Javascrpt using regex101 my example seems to work https://regex101.com/r/rK2jMU/4
How can i improve or change my regex to allow for the requirements as stated above?
Thanks in advance.