How can I improve this regex to extract only numbers that contain "-" or no characters present between numbers inside string. For Example:
My phone number is 647-871-9067. tax year 2013. $9,846.22.
Should Extract [647-871-9067]
or
My phone number is 6478719067. tax year 2013. $9,846.22.
Should Extract [6478719067]
only.
This is the regex I have written but it is extracting 2013
along with phone number
\b\s\(?([0-9-*)?]*)