Search for files with phone numbers

You have 50,000 html files, some of which contain phone numbers. How would you create a list of all the files which contain phone numbers?
Note : Phone numbers are in format ddd[- OR ' ']ddd[- OR ' ']dddd

One Comment

  1. syam says:

    grep -lr "[0-9]\{3\}[ -][0-9]\{3\}[ -][0-9]\{4\}" *

Leave a Reply