Test, validate and match regular expressions
Matches a literal closing parenthesis followed by all remaining characters up to the end of a line. With the global and multiline flags enabled, it applies this pattern to every line in the input rather than just the first. It's commonly used to strip trailing text, notes, or comments that appear after a closing parenthesis, for example reducing 'func(arg) # comment' to 'func(arg)' by replacing the match with ')'. Since the dot does not match newlines, each match is confined to a single line.