Sam Giraffe writes:
> Hi,
>
> I am trying to split up the re pattern for Apache log file format and seem to
> be having some
> trouble in getting Python to understand multi-line pattern:
>
> #!/usr/bin/python
>
> import re
>
> #this is a single line
> string = '192.168.122.3 - - [29/Sep/2013:03:
On 08Oct2013 10:59, Skip Montanaro wrote:
| > Aiui apache log format uses space as delimiter, encapsulates strings in
| > '"' characters, and uses '-' as an empty field.
|
| Specifying the field delimiter as a space, you might be able to use
| the csv module to read these. I haven't done any Apac
> Aiui apache log format uses space as delimiter, encapsulates strings in
> '"' characters, and uses '-' as an empty field.
Specifying the field delimiter as a space, you might be able to use
the csv module to read these. I haven't done any Apache log file work
since long before the csv module was
On Mon, 07 Oct 2013 23:33:31 -0700, Sam Giraffe wrote:
> I am trying to split up the re pattern for Apache log file format and
> seem to be having some trouble in getting Python to understand
> multi-line pattern:
Aiui apache log format uses space as delimiter, encapsulates strings in
'"' charac
On 2013-10-08, Sam Giraffe wrote:
>
> Hi,
>
> I am trying to split up the re pattern for Apache log file format and seem
> to be having some trouble in getting Python to understand multi-line
> pattern:
>
> #!/usr/bin/python
>
> import re
>
> #this is a single line
> string = '192.168.122.3 - - [2
On 08.10.2013 08:33, Sam Giraffe wrote:
#this is a single line
string = '192.168.122.3 - - [29/Sep/2013:03:52:33 -0700] "GET / HTTP/1.0"
302 276 "-" "check_http/v1.4.16 (nagios-plugins 1.4.16)"'
#trying to break up the pattern match for easy to read code
pattern = re.compile(r'(?P\d{1,3}\.\d{1,3
Hi,
I am trying to split up the re pattern for Apache log file format and seem
to be having some trouble in getting Python to understand multi-line
pattern:
#!/usr/bin/python
import re
#this is a single line
string = '192.168.122.3 - - [29/Sep/2013:03:52:33 -0700] "GET / HTTP/1.0"
302 276 "-" "