Just reading up on Pyparsing so I could be off here, but I would actually argue that if a codebase relies heavily enough on strings (for identification?) that regex no longer cuts it, I would consider whether or not there is a better way of doing it, and not necessarily turn to heavier guns in parsing.
Again, I could very well be misunderstanding. Does anyone have an example of Pyparsing in action? On 7 May 2014 00:12, Jeremy YeoKhoo <[email protected]> wrote: > Thanks so much Chad, yes I agree. Not many TDs are aware or understand the > necessity of good program design and structure (me included!) and in this > case naming convention! Ill have to have a look at that and apply what I > can to my own set of tools that i am currently in the process of creating > > Thanks > -Jeremy > > > On Sunday, 4 May 2014 20:47:26 UTC+10, Jeremy YeoKhoo wrote: > >> Hey guys, >> >> This should be fairly easy for you guys who know regex. If I have a >> string that I want to enable versioning, so say for an example I want to >> recognize a string if it contains ['v001', 'v002', etc...] >> I have something like this... >> >> remp= re.search('[0-9]+', 'hello_v001') >> print temp.group() >> >> but I dont want it to return when: >> remp= re.search('[0-9]+', 'hello_001') >> print temp.group() >> >> Thanks >> -Jeremy >> >> -- > You received this message because you are subscribed to the Google Groups > "Python Programming for Autodesk Maya" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/python_inside_maya/ba398c57-19f8-4096-8524-07f609f1496c%40googlegroups.com<https://groups.google.com/d/msgid/python_inside_maya/ba398c57-19f8-4096-8524-07f609f1496c%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- *Marcus Ottosson* [email protected] -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOD-0rkPSh1QZrzntoLmk7Fawst3%3DGHWmT5w0Fo0yEgn5Q%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
