Then maybe I'm not understanding what you're asking.  Take the following
example:


###############

my $string = "him||her||him||her";
$string =~ s/\|\|/ or /g;
print $string;

###############

The output is "him or her or him or her"

Is that not what you're asking?

-----Original Message-----
From: Jerry Preston [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 30, 2003 8:55 PM
To: 'Tim Johnson'; [EMAIL PROTECTED]
Subject: RE: how to regex or


Tim,

Yes, but does not do the job.

Thanks,

Jerry

-----Original Message-----
From: Tim Johnson [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 30, 2003 9:09 PM
To: 'Jerry Preston'; [EMAIL PROTECTED]
Subject: RE: how to regex or


Have you tried this?

s/\|\|/ or /g;

-----Original Message-----
From: Jerry Preston [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 30, 2003 7:06 PM
To: [EMAIL PROTECTED]
Subject: how to regex or


Hi!

I am trying to swap all the '||' in a string to or:  
      s/||/ or /g;

I have tried it a number of ways, but I am getting no where.

Any ideas?

Thanks,

Jerry

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

Reply via email to