in reply to Re^2: Is there any regex limitation?
in thread Is there any regex limitation?

You can't use split to parse CSV records—at least not the general form of CSV records represented in benlaw's example. It won't work.

Actually yes you can

Using split as I've shown is as-good as benlaws intended solution, with the benefit of no backtracking

But its a solved problem, so Text::CSV or Text::xSV

Replies are listed 'Best First'.
Re^4: Is there any regex limitation?
by BrowserUk (Patriarch) on Jul 24, 2011 at 18:08 UTC
    Actually yes you can

    No. You cannot. Some of the fields contain embedded commas.

      No. You cannot. Some of the fields contain embedded commas.

      I know, I didn't say its possible using /,/

        You said:

        Actually yes you can. Using split...

        I defy you to correctly parse the OPs two sample records using split only.

        And if you can't, which you won't, then you were talking shite.

        I know, I didn't say its possible using /,/

        Yes you did. That's precisely what you suggested and demonstrated doing in your reply to benlaw.