On 2014-01-20, Roy Smith <r...@panix.com> wrote: > In article > <mailman.5748.1390216721.18130.python-l...@python.org>, Ben > Finney <ben+pyt...@benfinney.id.au> wrote: >> Be aware that regex is not the solution to all parsing >> problems; for many parsing problems it is an attractive but >> inappropriate tool. You may need to construct a more specific >> parser for your needs. Even if it's possible with regex, the >> resulting pattern may be so complex that it's better to write >> it out more explicitly. > > Oh, posh. > > You are correct; regex is not the solution to all parsing > problems, but it is a powerful tool which people should be > encouraged to learn. For some problems, it is indeed the > correct tool, and this seems like one of them. Discouraging > people from learning about regexes is an educational > anti-pattern which I see distressingly often on this newsgroup.
I use regular expressions regularly, for example, when editing text with gvim. But when I want to use them in Python I have to contend with the re module. I've never become comfortable with it. -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list