RE: Re:Problem with regex

2011-11-17 Thread Barry Brevik
> Don't know if it helps, but I seem to have installed > Text::CSV_XS on Activestate 5.14.1 build 1401. I'm on Perl 5.8.8 because my Perl DevKit only works on that version. Barry Brevik ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.Active

Re:Problem with regex

2011-11-17 Thread Barry Brevik
> $csvLine =~ s/(".+?),(.+?")/$1|$2/g; For some reason this substitution does not seem to work all the time, depending on which fields have commas in them. I finally tinkered my way into this: $csvLine =~ s/("[^",]+?),([^",]+?")/$1|$2/g; ...which seems to work a little better, but will not dea

RE: Re:Problem with regex

2011-11-17 Thread Brian Raven
> -Original Message- > From: perl-win32-users-boun...@listserv.activestate.com [mailto:perl- > win32-users-boun...@listserv.activestate.com] On Behalf Of Barry Brevik > Sent: 17 November 2011 17:29 > To: perl Win32-users > Subject: Re:Problem with regex > > ... >

Re:Problem with regex

2011-11-17 Thread Barry Brevik
> Nevertheless let me also try to explain the issue that you had with > the regex as this can come up in other situations. > > First, I'd probably use plain " instead of \x22 as that will be > probably easier to the reader to know what are you looking for. Wow. That is an incredible post. Yes,

Re:Problem with regex

2011-11-17 Thread Barry Brevik
Hi Barry, On Thu, Nov 10, 2011 at 2:34 AM, Barry Brevik wrote: > Below is some test code that will be used in a larger program. > > In the code below I have a regular expression who's intent is to look > for  " <1 or more characters> , <1 or more characters> " and replace > the comma with |. (