in reply to Break a long regex across multiple lines of code, with comments

Here's an example from some of my code that it using Test::More.

like( $query_results, qr{ Class \s+ Time \s+ Hostname \s+ IP \s Address \s+ Policy \s Server +# Head \s+ ---------------------------------------------------------[-]+ # + Head line \s+ dr_test_class # class \s+ $shared_data->{data}{date_regex} # date/time \s+ unknown # hostname \s+ 2001:db8::2 # ip address \s+ $RE{net}{domain}{-nospace} # domain name }mxs,

Neil Watson
watson-wilson.ca

  • Comment on Re: Break a long regex across multiple lines of code, with comments
  • Download Code