sadfasdf2 / google-refine

Automatically exported from code.google.com/p/google-refine
Other
0 stars 0 forks source link

GREL split() drops empty pieces #456

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
value.split('/') produces the following preview (string + result):

//Google Inc//Google Calendar 70.9054//EN   [ "Google Inc", "Google Calendar 
70.9054", "EN" ]

Python thinks the answer is ['', '', 'Google Inc', '', 'Google Calendar 
70.9054', '', 'EN'] which fits with my world view.

Original issue reported on code.google.com by tfmorris on 30 Sep 2011 at 6:17

GoogleCodeExporter commented 9 years ago
Just discovered that this function takes an optional "preserve all tokens" 
parameter which defaults to false.  This seems backwards to me, but it's too 
late to change it.

Original comment by tfmorris on 30 Sep 2011 at 6:57