KarthikK has asked for the wisdom of the Perl Monks concerning the following question:
Hello all,
i want to replace any string which contains "&;" a space before the semicolon
Example:
$strTest = "Sometext with cotnent K&K;";
my output should looke like this
"Sometext with cotnent K&K ;"
a space before the semicolon.
the issue is thre can be 'n' number of text or number between & and ; like
sometext with conetnst add kklkk&dfaf:dfaÜÄmlddö;
How can i write a pattern for this ?
is it possible atall?
thanks & regards
Karthik
i want to replace any string which contains "&;" a space before the semicolon
Example:
$strTest = "Sometext with cotnent K&K;";
my output should looke like this
"Sometext with cotnent K&K ;"
a space before the semicolon.
the issue is thre can be 'n' number of text or number between & and ; like
sometext with conetnst add kklkk&dfaf:dfaÜÄmlddö;
How can i write a pattern for this ?
is it possible atall?
thanks & regards
Karthik
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: simple regexp question
by jbert (Priest) on Nov 21, 2007 at 10:25 UTC | |
Re: simple regexp question
by cdarke (Prior) on Nov 21, 2007 at 09:45 UTC | |
Re: simple regexp question
by sen (Hermit) on Nov 21, 2007 at 09:50 UTC | |
by KarthikK (Sexton) on Nov 21, 2007 at 10:50 UTC | |
Re: simple regexp question
by andreas1234567 (Vicar) on Nov 21, 2007 at 09:38 UTC | |
by johngg (Canon) on Nov 21, 2007 at 09:49 UTC | |
by Punitha (Priest) on Nov 21, 2007 at 10:57 UTC |
Back to
Seekers of Perl Wisdom