Test, validate and match regular expressions
Matches a string or line consisting only of word characters (letters, digits, underscore) plus dot, hyphen, tilde, and colon. With the multiline flag, each line in the input must fully satisfy the pattern. Useful for validating simple identifiers, filenames, path segments, or reference codes that allow these punctuation marks but no spaces or other characters.