praveenchappa has asked for the wisdom of the Perl Monks concerning the following question:
i had a string which has a pattern @begin...@end , i need to replace each occurance with an element in an array @replace....Help me out
$string=" hi hello @begintobe replace @end asas x x x x x zxzxax hi hello hi hellooo @beginthis has tobe replaced @end" ..... i had @replace=["replacestring1","replacestring2"....] i need to have my string like. $string=" hi hello @begin replacestrinjg1 @end asas x x x x x zxzxax hi hello hi hellooo @begin replacestring2 @end" .....
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: need a regular exdpression in perl
by Loops (Curate) on Nov 20, 2014 at 08:24 UTC | |
by Corion (Patriarch) on Nov 20, 2014 at 08:31 UTC | |
|
Re: need a regular exdpression in perl
by GrandFather (Saint) on Nov 20, 2014 at 08:07 UTC | |
|
Re: need a regular exdpression in perl
by Eily (Monsignor) on Nov 20, 2014 at 08:08 UTC | |
|
Re: need a regular exdpression in perl
by Corion (Patriarch) on Nov 20, 2014 at 08:09 UTC | |
|
Re: need a regular exdpression in perl
by AnomalousMonk (Archbishop) on Nov 20, 2014 at 14:57 UTC | |
|
Re: need a regular exdpression in perl
by Anonymous Monk on Nov 20, 2014 at 08:13 UTC | |
|
Re: need a regular exdpression in perl
by Sathishkumar (Scribe) on Nov 20, 2014 at 11:07 UTC | |
|
Re: need a regular exdpression in perl
by praveenchappa (Acolyte) on Nov 20, 2014 at 08:26 UTC | |
by Eily (Monsignor) on Nov 20, 2014 at 09:38 UTC |