AW: Regular expression help

2009-09-10 Thread Tariq Doukkali
Hi, try with this code: #!/usr/bin/perl -w my $test = 'a,c,d,f,r,t,"f(3),g(4)",d,f,f,f,"f(3),t(8)",d,t'; $test =~ s/\"([a-z][\(0-9\)]*),([a-z][\(0-9\)]*)\"/$1|$2/g; print $test . "\n"; Tariq -Ursprüngliche Nachricht- Von: Dave Tang [mailto:d.t...@imb.uq.edu.au] Gesendet: Mittwoch, 26

AW: regular expression

2002-08-13 Thread Hughes, James
Hi there, I am also just starting out in perl, but I would use the split funtion. It takes the variable a part at desired points just like awk. example: #!/usr/bin/perl # open (FH,") { #Reads log file to $_