^start of line
.?optionally matches any character (except for line terminators)
.?optionally matches any character (except for line terminators)
.?optionally matches any character (except for line terminators)
.?optionally matches any character (except for line terminators)
.?optionally matches any character (except for line terminators)
.?optionally matches any character (except for line terminators)
\5the text saved by group 5
\4the text saved by group 4
\3the text saved by group 3
\2the text saved by group 2
\1the text saved by group 1
$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