Tag parsing in python
joshua.r.english at gmail.com
Sun Aug 29 00:12:17 CEST 2010
On Aug 28, 9:14 am, agnibhu <dee... at gmail.com> wrote:
> Hi all,
> I'm a newbie in python. I'm trying to create a library for parsing
> certain keywords.
> For example say I've key words like abc: bcd: cde: like that... So the
> user may use like
> abc: How are you bcd: I'm fine cde: ok
> So I've to extract the "How are you" and "I'm fine" and "ok"..and
> assign them to abc:, bcd: and cde: respectively.. There may be
> combination of keyowords introduced in future. like abc: xy: How are
> So new keywords qualifying the other keywords so on..
> So I would like to know the python way of doing this. Is there any
> library already existing for making my work easier. ?
Have you looked at pyparsing? (http://pyparsing.wikispaces.com/) It
be possible to use that library to do this.
More information about the Python-list