On Aug 20, 1:02 pm, John K Masters <[EMAIL PROTECTED]>
wrote:
> On 19:19 Mon 20 Aug , [EMAIL PROTECTED] wrote:
>
>
>
> > import StringIO
>
> > text = """\
> > To mimic Perl's input record separator in
> > Python, you can use a generator.
> > And a substring test.
> > Perhaps something like the
On 19:19 Mon 20 Aug , [EMAIL PROTECTED] wrote:
>
> import StringIO
>
> text = """\
> To mimic Perl's input record separator in
> Python, you can use a generator.
> And a substring test.
> Perhaps something like the following
> is what you wanted.
> """
>
> mockfile = StringIO.StringIO(text)
On Aug 19, 11:13 am, John K Masters <[EMAIL PROTECTED]>
wrote:
> I am currently working my way through Jeffrey Friedl's book Mastering
> Regular Expressions. Great book apart from the fact it uses Perl for the
> examples.
>
> One particular expression that interests me is '$/ = ".\n"' which,
> rath
On 10:30 Mon 20 Aug , Nick Craig-Wood wrote:
> Something like this maybe?
>
> import re
>
> input_data = """I am currently working my way through Jeffrey Friedl's book
> Mastering
> Regular Expressions. Great book apart from the fact it uses Perl for the
> examples.
>
> One particular expre
John K Masters <[EMAIL PROTECTED]> wrote:
> I am currently working my way through Jeffrey Friedl's book Mastering
> Regular Expressions. Great book apart from the fact it uses Perl for the
> examples.
>
> One particular expression that interests me is '$/ = ".\n"' which,
> rather than splitti
"John K Masters" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>I am currently working my way through Jeffrey Friedl's book Mastering
> Regular Expressions. Great book apart from the fact it uses Perl for the
> examples.
>
> One particular expression that interests me is '$/ = ".\n"
On Aug 19, 1:13 pm, John K Masters <[EMAIL PROTECTED]>
wrote:
> I am currently working my way through Jeffrey Friedl's book Mastering
> Regular Expressions. Great book apart from the fact it uses Perl for the
> examples.
>
> One particular expression that interests me is '$/ = ".\n"' which,
> rathe
I am currently working my way through Jeffrey Friedl's book Mastering
Regular Expressions. Great book apart from the fact it uses Perl for the
examples.
One particular expression that interests me is '$/ = ".\n"' which,
rather than splitting a file into lines, splits on a period-newline
boundary.