((\d\d\d)\s)?\d\d\d-\d\d\d\d
just wondering what would be the meaning of above?
I think the first part ((\d\d\d)\s)? means something like this:
352k (since \d means random digit, \s means a non-space character, so I just use k here, and ? here means 352k repeated 0 or 1 time, so I have it 1 time here)
Then I am not quite sure what is the meaning of the thing that follows it i.e. \d\d\d-\d\d\d\d
I don't get the - (the minus sign) here and how it relates the first 3 digits, and last 3 digits in this expression here.
P.S. I tried this here (they don't work): (345) 578-3291 (382) 441-2219 or 341 319-3183 or 321 999-1318
so phone number pattern doesn't work. Does anyone know?