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