RE: [Perl-unix-users] Problem that I am having with split command

2004-04-14 Thread Stacy Doss
You need to be aware that split works on a regexp therefore the /./ is matching any character. I'm not sure what you vars $projectnumber and $pa are but I'll assum you want something like this $string = '500/00-7.1.19.3'; # This will split the whole string at once retaining only the digits for

RE: [Perl-unix-users] Some help with strings

2004-04-05 Thread Stacy Doss
Your RE $string =~ s/\||/\|/g; First the second pipe is not escaped so it maintains its "or-ness" So the match part of your RE is backslash or nothing (or null/nil if you like) nil matches before and after each real character, for the matches or backslash you're simply substituting backslash Try

RE: [Perl-unix-users] URGENT Regex problem

2002-07-30 Thread Stacy Doss
Eh? my $IN = open("my.in.file") or die "Horrible death"; while (<$IN>) { s/\A\^\[//; # Do stuff } -Original Message- From: Craig Sharp [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 30, 2002 1:04 PM To: [EMAIL PROTECTED] Subject: [Perl-unix-users] URGENT Regex problem