discoTab has asked for the wisdom of the Perl Monks concerning the following question:
I am splitting fields based on a ~, and need to find any strings that begin and end with quotation marks (ie. "disco"). My problem is I have strings that contain a ~, which breaks my split: "disco~tab". My initial thought was to use a conditional in the regex to find any string that begins with but does not end with a '"' and load it into $a1 and then find the next string which ends with a '"' and load it into $a2, and then concatenate the two strings. Now I find that there is no good way to do this with regex due to the lack of an AND conditional, so I'm kind of at a loss... Any help would be grateful!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: RegEx Perl Newbie Question
by AppleFritter (Vicar) on Aug 18, 2014 at 21:07 UTC | |
by Athanasius (Archbishop) on Aug 19, 2014 at 02:37 UTC | |
by Anonymous Monk on Aug 19, 2014 at 05:24 UTC | |
by Athanasius (Archbishop) on Aug 19, 2014 at 06:48 UTC | |
by Anonymous Monk on Aug 19, 2014 at 08:06 UTC | |
by AppleFritter (Vicar) on Aug 19, 2014 at 07:40 UTC | |
|
Re: RegEx Perl Newbie Question
by AnomalousMonk (Archbishop) on Aug 19, 2014 at 00:42 UTC | |
|
Re: RegEx Perl Newbie Question
by discoTab (Initiate) on Aug 19, 2014 at 15:06 UTC |