Basics of Pattern Matching & Substitutions with Perl ...

m Treat string as multiple lines. s Treat string as single line; i.e., treat newlines as “dots” x Allow whitespace and comments in your regular expression. Example: /[acgt]+/i checks if a string contains any number of valid DNA sequence characters of either case. Using the caret (^) with character class ................
................