Description |
I've created this regex expression to parse portuguese phone numbers from an webpage.
As this was made with a very specific purpose, the expression expects the number to be preceded and followed by any character that's not a digit or a letter (basically space or "special" character).
This way I can parse any page with confidence that the results will be adequate.
I'd also recommend that you strip any spaces and "new line" from the haystack before matching it with this regex.
Here's an example: http://paste2.org/p/1610446 |