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?
This example fails because you're counting whitespace as part of the eight digits. Look again at the example the OP gave. He wants eight numeric digits after 5163, with the possibility of embeded whitespace. Your example would match "51631 8". That's not what he was asking for. His example output includes "5163 1234 5678" Your solution would provide "5163 1234 56" because it is counting spaces as part of the eight digits.
Dave
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: How to write a regular expression to extract a number from an embedded string?
by Eimi Metamorphoumai (Deacon) on Jul 28, 2004 at 20:42 UTC | |
by davido (Cardinal) on Jul 28, 2004 at 20:45 UTC |