in reply to phone number parsing refuses to work

If I observed correctly, you are looking for numbers of these formats:

  1. (123) 234-3456
  2. (123)234-3456

m/ ( # start caption \( # open paranthesis \d{3} # 3 digits \) # close paranthesis \s? # 0 or 1 whitespace \d{3} # 3 digits \- # 1 dash line \d{4} # 4 digits ) # end caption /xg;

Sören