[cl-ppcre-devel] CL-PPCRE Split behaviour

Sébastien Saint-Sevin seb-cl-mailist at matchix.com
Mon Aug 27 17:27:04 UTC 2007


Hi again,

> Hi Edi & list,
> 
> While using cl-ppcre:split recently, I discover that when the regex 
> match at pos 0, the function returns an empty string in first pos,
> where I think it should not as I do not consider the empty string being 
> a substring of the original one.

I should have say "the empty string at pos 0" (I'm ok with empty strings in the middle of the string when two consecutives matches occurs with no char in between).
The same can be said for an empty string at the end (but this can't be seen as the empty strings are removed when at the end).
Hope this clarifies a bit my thought...


> 
> I don't know the Perl behaviour in this particular case, but I hope it 
> is not a peculiar behaviour as the doc says :-)
> 
> Ex : (cl-ppcre:split "\\s+" " foo bar baz ")
> ==>  ("" "foo" "bar" "baz")
> 
> I would prefer to get ("foo" "bar" "baz")
> 
> What do you think of it ?
> Thks, Sebastien.
> _______________________________________________




More information about the Cl-ppcre-devel mailing list