Variables in REs

Yoav yoav_artzi at
Wed Aug 24 11:59:08 CEST 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.


More information about the Python-list mailing list