Can somebody help me construct this regular expression, please…
Given the following strings…
- "April ( 123 widgets less 456 sprockets )"
- "May (789 widgets less 012 sprockets)"
I need a regular expression that will extract the two numbers from the text. The month name will vary. The brackets, "widgets less" and "sprockets" text are not expected to change between strings, however, it would be really useful if this text was able to be varied as well.
if you know for sure that there are only going to be 2 places where you have a list of digits in your string and that is the only thing you are going to pull out then you should be able to simply use