Python: regular expressions

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 02 February 2007   #1
Python: regular expressions

I'm completely new to Python, and don't like the tab/space thing for block control, but in the spirit of trying to learn a new language, I'm thinking of doing my Lego-block loading scriptin in Python instead of Perl. (It would also make it easier to create a Lego plugin completely in Python once I get ahold of a version of Maya later than 6.0)

How is Python as far as regular expressions go? I assume that there is some kind of module to handle all the nifty regexp features? How does it compare to Perl's handling of the same?
 
Old 02 February 2007   #2
The regular expression module is called re:

import re

I'm not sure how it compares to perl but it's well featured and fairly simple to use. You can find docs for the module here:

http://docs.python.org/lib/module-re.html

hope that helps
 
Old 02 February 2007   #3
Originally Posted by shufflebreaker: The regular expression module is called re:

import re

I'm not sure how it compares to perl but it's well featured and fairly simple to use. You can find docs for the module here:

http://docs.python.org/lib/module-re.html

hope that helps


Thanks. Turns out that the original OReilly _Mastering Regular Expressions_ has a section on Python and re, according to the Python FAQs. I have that book, just can't find it.

Will check your reference also.
 
Old 02 February 2007   #4
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 04:52 PM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.