in reply to Help with Regex in Split
Are you looking for this?:
my( @stuff ) = $entry =~ m/"([^",]+)"/g;
...instead of using split?
Important note: If your individual values contain either commas or " quote characters, this isn't the right solution for you. If your data has the possibility of containing embedded commas or quote characters, you should probably have a look at Text::CSV or Text::Balanced. Trying to deal with comma separated data with embedded quotes which could lead to embedded commas can get really tricky really fast if you're trying to do it with regular expressions alone. The modules are designed to help in such situations.
Dave
|
|---|