[oak perl] Regex Practices #1: separate lines?

George Woolley george at metaart.org
Tue Mar 16 00:24:48 CST 2004


Tony,

When writing very simple regular expressions like
      ^key=
      :$
do you recommend using several lines?

Example:
   if ( $line =~ m/
                      ^
                      key=

                /x ) {
      # ...
   }

Example:
   if ( $line !~ m/

                      :
                      $
                /x ) {
   }

George




More information about the Oakland mailing list