in reply to Re: Pattern Matching Question
in thread Pattern Matching Question

In English, I can see the string "supplied on 5.25" disk" as valid. But since I'm of a literal mind, the disk and closing quote aren't part of the string.

So I'd propose an example of what you are talking about as something like "supplied on 5.25\" disk" which is a valid Perl string...

Not that it really matters, just a slight nitpick.

Replies are listed 'Best First'.
Re: Re: Re: Pattern Matching Question
by sweetblood (Prior) on Sep 10, 2003 at 17:37 UTC
    The problem is that we don't always get to deal with data we create. In my current work, I deal with POS data from many sources and lots of it. So this, in a way is a real life example. Some of the data I deal with comes in a quote-delimited fashion and I often see things like this.
    You are right if I were creating these data, I would likely use double quotes only to deliniate between alpha and numeric data. Of course that's only if I were limited to using a delimiter that might appear in my data.
    Unfortunitly most commercially available tools for parsing will parse these data incorrectly. Like you they view it as "supplied on 5.25" and the rest just hits the bit bucket. This is where perl comes in handy to prep data that has issues like this.

    Thank goodness and LW for perl!