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+            # Comment

etc,

but "they don't work" and I suspect it is something to do with the spaces 
between the elements. I have even tried specifying spaces with \s


Can someone give me a pointer as to how to go about this. 




TIA


Owen  

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to