^start of line
Non-Capturing Group(?:\w+;)? ?repeats the group contents below at most once:
\w+any word character, repeated at least once
;the literal ; (5910 / 738 / 3B16)
\s*any whitespace character, repeated any number of times
publicthe literal text public (case sensitive) \s+any whitespace character, repeated at least once
\w+any word character, repeated at least once
\s+any whitespace character, repeated at least once
methodNamethe literal text methodName (case sensitive) \s*any whitespace character, repeated any number of times
\(the literal ( (4010 / 508 / 2816)
\)the literal ) (4110 / 518 / 2916)
\s*any whitespace character, 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