On Fri, Feb 27, 2009 at 10:01 AM, Paul McGuire wrote:
> Emad wrote:
> >>>
> Since I'm learning Pyparsing, this was a nice excercise. I've written this
> elementary script which does the job well in light of the data we have
>
> from pyparsing import *
> ID_TAG = Li
Emad wrote:
>>>
Since I'm learning Pyparsing, this was a nice excercise. I've written this
elementary script which does the job well in light of the data we have
from pyparsing import *
ID_TAG = Literal("")
FULL_NAME_TAG1 = Literal("")
END_TAG = Literal("', 'Joseph
On Fri, Feb 27, 2009 at 2:22 AM, spir wrote:
> Anyway for a startup exploration you can use regular expressions (regex) to
> extract individual data item. For instance:
>
> from re import compile as Pattern
> pattern = Pattern(r""".*(.+)<.+>.*""")
> line = "text text text Joseph"
> print pattern.
On Fri, Feb 27, 2009 at 2:59 AM, wesley chun wrote:
> > There is a text file that looks like this:
> >
> > text text text Joseph
> > text text text text text text text text text text text
> > text text text text text text text text text text text
> > text text text text text text text text text t
> There is a text file that looks like this:
>
> text text text Joseph
> text text text text text text text text text text text
> text text text text text text text text text text text
> text text text text text text text text text text text
> text text text text text text text text text text text
Le Thu, 26 Feb 2009 21:53:43 -0800,
Mohamed Hassan s'exprima ainsi:
> Hi all,
>
> I am new to Python and still trying to figure out some things. Here is the
> situation:
>
> There is a text file that looks like this:
>
> text text text Joseph
> text text text text text text text text text text
Hi all,
I am new to Python and still trying to figure out some things. Here is the
situation:
There is a text file that looks like this:
text text text Joseph
text text text text text text text text text text text
text text text text text text text text text text text
text text text text text te