in reply to Abritrary multiple spaces as delimiter

So, how do you determine the second element is "Genesis Chamber" and not "Genesis", with the third element being "Chamber Mark Tedin"? Or perhaps the second element is "Genesis Chamber Mark", and the third is "Tedin"?

Now, if elements are separated by at least two spaces, and between words belonging to the same element there's just a single space, you could split on /\s{2,}/. But if the delimiter is "arbitrary spaces", then the problem is not uniquely solvable.

Abigail

  • Comment on Re: Abritrary multiple spaces as delimiter