in reply to Re: How to write a regular expression to extract a number from an embedded string?
in thread How to write a regular expression to extract a number from an embedded string?

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.

  • Comment on Re^2: How to write a regular expression to extract a number from an embedded string?
  • Download Code