Edward Elliott wrote:
(snip)
>>don a écrit :
>>
>>>Also if there is a better way than using regex, please let me know.
>>
(snip)
> 
> 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 '[EMAIL PROTECTED]'.split('@')])"
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to