in reply to Regex for splitting a string on a semicolon (conditionally)

I strongly second the point made in the reply of LanX that you need to re-factor the unholy split regex you are attempting to use into something that is both readable and independently testable. (This assumes that Text::CSV will be of little help, which I also suspect is true.) Ideally, you will wind up with something like
    my @parts = split /;(?=\s$name)/, $text;
(or  qr{ , (?= \s $name) }xms as I would rather write the regex). This leaves you with the still substantial problem of defining
    my $name = qr{ ... }xms;
which will not be easy, but at least you will have an independently testable pattern at which you can throw "names" galore, as many as you can possibly think of, in order to test its efficacy.


Give a man a fish:  <%-(-(-(-<