> Hi, > > I am used to work with a search and replace software > and I have a list of pattern like the one above which > I would like to translate to PERL. Need your help and > comments. >
There is an example above? I'm assuming your Austrailian, since that'd mean you'd be upside down compared to this Scot. :) > [Search /ix](control of the car) > > +[A-Za-z]_NN/2 +[A-Za-z]_IN +[A-Za-z]_AT +[A-Za-z]_NN > > [Replace] > > <SN> %1 %2 %3 %4 </SN> > > Regards Sure you can do that, read: perldoc perlre You are looking for the s/// operator, which will work out rather like: $string = "MY STRING"; $string =~ s/MY/YOUR/; print $string; Giving: "YOUR STRING" You will need to use () for each value you wish to capture in your regular expression on the LHS, and the magic variables $1, $2, $3, $4 etc on the RHS. Jonathan Paton __________________________________________________ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]