Trouble splitting strings with consecutive delimiters
Emile van Sebille
emile at fenx.com
Tue May 1 13:36:46 EDT 2012
On 5/1/2012 10:13 AM Temia Eszteri said...
>> re.split(':|px;', "width:150px;height:50px;float:right")
>>
>> Emile
>
> That won't work at all outside of the example case. It'd choke on any
> attribute seperator that didn't end in px.
It would certainly choke on all delimeters that are not presented in the
argument. You're free to flavor to taste...
Emile
More information about the Python-list
mailing list