I'm trying to use the string replacer node in Knime with a regex expression to standardize a field in a database. I need to extract a number from a string, and then replace the entire string with that number. For example,
String: The Yearly order limit = 5,000
The result would be: 5,000
String: monthly order limit is 5
Result: 5
But, I also need to know whether it is a monthly, quarterly, or yearly limit as well. Some of the variations I've tried are: .\*yearly.*([0-9,]+)
and variations there of. Simply using ([0-9,]+)
gets the number for me, but does not identify anything else. Including anything outside the parentheses will match the whole string overall, but referring to capture group 1 gives me a 0 every time, regardless of what the number is. Does anyone know how to do this? Thanks!