1-9one character from 1 (4910) to 9 (5710)
\d{0,4}a digit, repeated between 0 and 4 times
\s+any whitespace character, repeated at least once
Group 1((optional|etc)\s+)? ?repeats the group contents below at most once:
optionalthe literal text optional (case sensitive) etcthe literal text etc (case sensitive) \s+any whitespace character, repeated at least once
{1,3}repeats the group contents below between 1 and 3 times:
\w+any word character, repeated at least once
\s+any whitespace character, repeated at least once
suffixthe literal text suffix (case sensitive) endthe literal text end (case sensitive) \s+any whitespace character, repeated at least once
?repeats the group contents below at most once:
optionalthe literal text optional (case sensitive) etcthe literal text etc (case sensitive) 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