On Oct 4, 7:28 am, Dan <[EMAIL PROTECTED]> wrote:
> So, paren matching is a canonical context-sensitive algorithm. Now,
> many regex libraries have *some* not-purely-regular features, but I
> doubt your going to find anything to match parens in a single regex.
> If you want to go all out you can use a parser generator (for python
> parser generators, seehttp://python.fyxm.net/topics/parsing.html).
> Otherwise, you can go about it the quick-and-dirty way you describe:
> scan for matching open and close parens, and ignore things in quotes
> and comments.
>
> -Dan

Dan, thanks for suggesting parser generators.

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to