Group 1((?:[0-9]{3}-[0-9]{4})?) Non-Capturing Group(?:[0-9]{3}-[0-9]{4})? ?repeats the group contents below at most once:
{3}matches exactly 3 characters from the set below:
0-9one character from 0 (4810) to 9 (5710)
-the literal - (4510 / 558 / 2D16)
{4}matches exactly 4 characters from the set below:
0-9one character from 0 (4810) to 9 (5710)
\s*any whitespace character, repeated any number of times
\w*any word character, repeated any number of times
,the literal , (4410 / 548 / 2C16)
\s*any whitespace character, repeated any number of times
\Sany non-whitespace character
.*any character (except for line terminators), repeated any number of times
$end of line
g modifier: global. Finds all matches instead of stopping after the first
m modifier: multiline. Causes ^ and $ to match the start and end of each line, not only the start and end of the string