Reg Ex help

bruno at modulix onurb at xiludom.gro
Fri May 12 10:25:32 CEST 2006

Edward Elliott wrote:
>>don a écrit :
>>>Also if there is a better way than using regex, please let me know.
> I wouldn't call these better (or worse) than regexes, but a slight variation
> on the above:
> marker = s.index('/CHECKEDOUT')
> branch = s [s.rindex('/', 0, marker) + 1 : marker]

Much cleaner than mine. I shouldn't try to code when it's time to bed !-)

bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'onurb at xiludom.gro'.split('@')])"

More information about the Python-list mailing list