Next Regular Expression Mastery 68

Strings that contain newlines: /s and /m

        ($subject) = ($message =~ /^(Subject:\s+(.|\n\s)*)$/m);

        ^       beginning of string
        $       end of string
        ^^      beginning of line
        $$      end of line
        .       match any single character
        \n      match a newline
        \N      match any single character except a newline


Next Copyright © 2002 M. J. Dominus