^start of line
arn:aws:connect:the literal text arn:aws:connect: (case sensitive) \w+any word character, repeated at least once
Non-Capturing Group(?:-\w+)+ +repeats the group contents below at least once:
-the literal - (4510 / 558 / 2D16)
\w+any word character, repeated at least once
:the literal : (5810 / 728 / 3A16)
\d{12}a digit, repeated exactly 12 times
:instancethe literal text :instance (case sensitive) \/the literal / (4710 / 578 / 2F16)
Character Class[A-Za-z0-9]+ +matches at least one character from the set below:
A-Zone character from A (6510) to Z (9010) (case sensitive)
a-zone character from a (9710) to z (12210) (case sensitive)
0-9one character from 0 (4810) to 9 (5710)
Non-Capturing Group(?:-[A-Za-z0-9]+)+ +repeats the group contents below at least once:
-the literal - (4510 / 558 / 2D16)
Character Class[A-Za-z0-9]+ +matches at least one character from the set below:
A-Zone character from A (6510) to Z (9010) (case sensitive)
a-zone character from a (9710) to z (12210) (case sensitive)
0-9one character from 0 (4810) to 9 (5710)
$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