Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #83628 > unrolled thread

Re: Python 3 regex?

Started byChris Angelico <rosuav@gmail.com>
First post2015-01-13 07:32 +1100
Last post2015-01-13 07:32 +1100
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Python 3 regex? Chris Angelico <rosuav@gmail.com> - 2015-01-13 07:32 +1100

#83628 — Re: Python 3 regex?

FromChris Angelico <rosuav@gmail.com>
Date2015-01-13 07:32 +1100
SubjectRe: Python 3 regex?
Message-ID<mailman.17637.1421094729.18130.python-list@python.org>
On Tue, Jan 13, 2015 at 6:48 AM, Ian <hobson42@gmail.com> wrote:
> My recommendation would be to write a recursive decent parser for your
> files.
>
> That way will be easier to write, much easier to modify and almost certainly
> faster that a RE solution - and it can easily give you all the information
> in the file thus future proofing it.

Generally, even a recursive descent parser will be overkill. It's
pretty easy to do simple string manipulation to get the info you want;
maybe that means restricting the syntax some, but for a personal-use
script, that's usually no big cost. The example I gave requires that
the indentation be correct, and on this mailing list, I think people
agree that that's not a deal-breaker :)

ChrisA

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web