Ok scrub that

 + works but * doesn't

i'm guess the * is matching anything 

took me 2 hours to figure that  ;)






-----Original Message-----
From: Steve Massey [mailto:[EMAIL PROTECTED]
Sent: 23 October 2003 11:33
To: [EMAIL PROTECTED]
Subject: substitution problem


Hi

I though I had sussed this s/ stuff but

#! /usr/bin/perl -w

$test =  "BRIGHTON,,,,,,,,,,,,,,,, (Firm),,,,,,,,,,,,,,,,,,,,,,,,,,,,";


print "$test\n";
$test =~ s/,*/,/;
$test =~ s/,*$/,/g;

print "$test\n";



does not work, I want to substitute all multiple commas into a single one.

any help appreciated

Steve

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to