Regular Expressions

Posted by Rocky on Stack Overflow See other posts from Stack Overflow or by Rocky
Published on 2010-05-16T01:57:22Z Indexed on 2010/05/16 2:00 UTC
Read the original article Hit count: 410

Filed under:
|
|

Hello Everyone,

I am new to Stackoverflow and I have a quick question. Let's assume we are given a large number of HTML files (large as in theoretically infinite). How can I use Regular Expressions to extract the list of Phone Numbers from all those files?

Explanation/expression will be really appreciated. The Phone numbers can be any of the following formats:

  • (123) 456 7899
  • (123).456.7899
  • (123)-456-7899
  • 123-456-7899
  • 123 456 7899
  • 1234567899

Thanks a lot for all your help and have a good one!

© Stack Overflow or respective owner

Related posts about regex

Related posts about phone