in reply to Is there any regex limitation?
The problem is that your regex can cause a lot of backtracking. Since (.*?) is also allowed to match a comma, a failed match will mean that each .*? group tries to match a different number of characters. Since you have so many of these groups, there's a huge number of possible matches (all of which will fail), which is why the regex engine takes so much time.
The better approach is of course to use Text::CSV, which will also handle the quoting inside a field for you.
Another efficient but less robust approach is to use split.
|
|---|