Sorry, left off critical info, I'm using Perl
----- Original Message -----
From: "Jay Strauss" <[EMAIL PROTECTED]>
To: "vox-tech" <[EMAIL PROTECTED]>
Sent: Wednesday, May 23, 2001 11:18 AM
Subject: [vox-tech] Simple regex question
> I have two variables:
>
> my $fromuser = "CRPCTL";
> my $touser = "CT7333";
>
> I have a text file with a bunch of "CRPCTLI"s in it, and want to change
them
> to "CT7333_I". But I can't form the proper regex:
>
> I tried
>
> s/$fromuser."I"/$touser."_I/g;
> s/"$fromuserI"/"$touser_I"/g;
> s/$fromuser\."I"/
>
> I don't want to have to do:
> $search = $fromuser."I";
> $replace = $touser."_I";
>
> s/$search/$replace/g;
>
> Jay
>
> Jay Strauss
> [EMAIL PROTECTED]
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com