in reply to Re: split function using multiple delimiters
in thread split function using multiple delimiters

You're sure in the running for the "unhelpful reply of the day" award (OMG! He didn't "use strict" either!), but at least you said one useful thing:
But, I suspect the style of your data will vary from item to item... omitting the Harvard comma, using an ampersand instead of "and" and so on... so the overall solution won't be a single PATTERN for use in split, anyway.
Parsing citations is pretty hard unless they are machine-generated. There are a bunch of formats, and people regularly screw them up.
  • Comment on Re^2: split function using multiple delimiters

Replies are listed 'Best First'.
Re^3: split function using multiple delimiters
by Lotus1 (Vicar) on Dec 27, 2011 at 17:58 UTC

    I thought the results of the code from the OP was helpful. That would have been nice to see in the OP.

Re^3: split function using multiple delimiters
by JavaFan (Canon) on Dec 27, 2011 at 19:19 UTC
    You're sure in the running for the "unhelpful reply of the day" award
    I think ww's response is the best post in this thread.
      How so?
      OP: How do I split a string on comma and/or "and"?

      ww: (lots of stuff not answering the question)

      How is that helpful?

        I read the reply as: "This is what your solution achieves currently. By looking at the results, you can probably see what goes wrong and split it into multiple sub-problems and possibly even have an idea on how to fix them." In other words, he was teaching debugging through inspecting data and it will help with the apparent "cobble together code and modify it until it appears to work" mentality the OP might have.