in reply to Regex for extracting phone numbers from string

There are zillions of ways to recognize a telephone number, but none of them is universal. It all depends on whether you are willing to accept false positive or false negative matches, and how much you know about the various formatting possibilities.

One possible try is something like this:

$num = $1 if $string =~ /\d[\d.()\s-]{5-18}/;
i.e. a leading digit followed by a certain number of digits, spaces, parens, or dashes.