I need to extract a value from a large body of text. I'm assuming the best way to do this would be to use a regular expression. If anyone thinks there's a better way to do it, feel free to offer up a suggestion.
The value I need to extract always appears in a string of the form:
[formatted_int_value] results across [the_integer_value_I_need_to_extract] pages
e.g: 3,342 results across 67 pages
In the example above the value I'm trying to extract is 67. Also note that each word in the example above may be separated by one or more whitespaces and/or newline characters. And, as mentioned above, this text is part of a larger body of text (I'm screen scraping a web page).
Can someone help me with a regex to extract the int value I need (67 in my example above) that takes into consideration the conditions I've provided?
Thanks.