Reputation: 3
Id like to capture user data which has the format
name phone address
I'm using the phone as the hook to identify the part before phone as name and part after it as address, the phone should have 6-12 digits and can have these characters as well "+()[]-. ". I tried this regex
(.*)\s([0-9]{6-12}[\+\s\(\)-\[\]\.]+)\s(.*)
But its not acknowledging the range part {6-12}. What am I doing wrong and is there a better regex approach ?
Upvotes: 0
Views: 66