Re: trying to understand how regex works

2002-08-13 Thread csaba . raduly
On 13/08/2002 06:26:59 perl-win32-users-admin wrote: Hi all, I guess it must be a simple problem, but it's a mystery to me. [snip question involving regex] Anybody cares to explain this to me? Try running your script with perl -re=debug scriptname.pl 2re_debug Make sure you redirect stderr

RE: trying to understand how regex works

2002-08-13 Thread Joseph Youngquist
, 2002 12:39 AM To: Dan Jablonsky Cc: [EMAIL PROTECTED] Subject: Re: trying to understand how regex works Dan Jablonsky wrote: Hi all, I guess it must be a simple problem, but it's a mystery to me. I got 30 fields all separated by pipes in some files with many many lines. Some of the fields

Re: trying to understand how regex works

2002-08-13 Thread Thomas R Wyant_III
Ron Grabowski [EMAIL PROTECTED] wrote: my $regex = join '|', 'value_garbage1', 'value_garbage2', 'value_garbage3'; next if /$regex/; You might want to say next if /$regex/o to prevent Perl from compiling every time. If you're Perl 5.6, you could

trying to understand how regex works

2002-08-12 Thread Dan Jablonsky
Hi all, I guess it must be a simple problem, but it's a mystery to me. I got 30 fields all separated by pipes in some files with many many lines. Some of the fields need to be changed, but mostly I have to drop any line that has certain values in certain fields. So I start by skipping any field

Re: trying to understand how regex works

2002-08-12 Thread $Bill Luebkert
Dan Jablonsky wrote: Hi all, I guess it must be a simple problem, but it's a mystery to me. I got 30 fields all separated by pipes in some files with many many lines. Some of the fields need to be changed, but mostly I have to drop any line that has certain values in certain fields. So I

Re: trying to understand how regex works

2002-08-12 Thread Ron Grabowski
open FOUT, /some/path/outputfile.txt; open FILE /some/path/inputfile.txt; open(FOUT, /some/path/outputfile.txt) or die(Error: $!); open(FILE /some/path/inputfile.txt) or die(Error: $!); whileFILE{ p=N; next if (/.*?\|value_garbage1\|.*?/ || /.*?\|value_garbage2\|.*?/ ||