Split on multiple delimiters, and also treat consecutive delimiters as a single delimiter?

m mvoicem at gmail.com
Tue Jul 28 15:59:03 CEST 2015


W dniu 28.07.2015 o 15:55, Victor Hooi pisze:
> I know the regex library also has a split, unfortunately, that does not collapse consecutive whitespace:
> 
> In [19]: re.split(' |', f)

Try ' *\|'

p. m.


More information about the Python-list mailing list