Variables in REs

Yoav yoav_artzi at il.vio.com
Wed Aug 24 05:59:08 EDT 2005


Anyway to set variables in REs. Meaning:
I have the RE re.compile(r'/[^/]*') for example and I want to use it on 
both Win32 machines and Unix machnes. Meaning tha tI need to be able to 
control the '/' before compiling. I want to create and if and decide 
what the system is and then put the right char in a variable and compile 
the RE using that varialbe. I am quite a noob, so I know the question 
might sound stupid, but any help will be appreciated.

Thanks.



More information about the Python-list mailing list