Please be aware that your suggestion of using
will greedily include everything to the end of the string. The OP specifically states 8 digits, with possible whitespace breaking the digits into groups of 4..*
While your suggestion works on your test data, it will not work on certain other data.
In reply to Re^2: How to write a regular expression to extract a number from an embedded string?
by pbeckingham
in thread How to write a regular expression to extract a number from an embedded string?
by jwking
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |