Re: Formatting/presenting regex

2007-01-03 Thread John W. Krahn
Owen wrote: > I have this regex to look at an Apache log. > > m/^(\S+) \S+ \S+ \[(\d{2})\/(\S+)\/(\d{4}):.+\] "(\w+) (\S+) > ([^"]+)" (\d{3}) (\d+|-) ".+"$/; > > Would like to set it out in a bit more readable form a la Perl Cook Book and > others > > eg > > m/ > ^(\S+)# Commen

Re: Formatting/presenting regex

2007-01-03 Thread Wiggins d'Anconia
Owen wrote: I have this regex to look at an Apache log. There are modules to help with that task on CPAN. m/^(\S+) \S+ \S+ \[(\d{2})\/(\S+)\/(\d{4}):.+\] "(\w+) (\S+) ([^"]+)" (\d{3}) (\d+|-) ".+"$/; Would like to set it out in a bit more readable form a la Perl Cook Book and others eg m

Formatting/presenting regex

2007-01-03 Thread Owen
I have this regex to look at an Apache log. m/^(\S+) \S+ \S+ \[(\d{2})\/(\S+)\/(\d{4}):.+\] "(\w+) (\S+) ([^"]+)" (\d{3}) (\d+|-) ".+"$/; Would like to set it out in a bit more readable form a la Perl Cook Book and others eg m/ ^(\S+) # Comment \S+# Comment \S+