in reply to Using negative lookahead
The others have already given you some excellent answers. I just wanted to point out Regexp::Common::delimited as well as Text::Balanced, which contain functions that implement something like what you are doing. Also, this task sounds like something that one encounters when parsing formats for which parsers might already exist, a common one being Text::CSV. Also, personally I find it easier to write my regex tests as I showed in Re: How to ask better questions using Test::More and sample data.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Using negative lookahead
by ibm1620 (Hermit) on Oct 19, 2017 at 23:13 UTC |