texuser74 has asked for the wisdom of the Perl Monks concerning the following question:
Input:
Output:<crossRef refid="">xx</crossRef> <crossRef refid="">yy</crossRef> <affiliation id="aff01"><label>xx</label> <affiliation id="aff02"><label>yy</label>
my code:<crossRef refid="aff01">xx</crossRef> <crossRef refid="aff02">yy</crossRef> <affiliation id="aff01"><label>xx</label> <affiliation id="aff02"><label>yy</label>
my code is not working properly. please suggest me the correct way of doing it.if (/<affiliation id="(.+?)"><label>(.+?)<\/label>/) { $affid=$1; $afflbl=$2; s!<crossRef refid="(.*?)">$afflbl</crossRef>!<crossRef refid="$a +ffid">$afflbl</crossRef>!g; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: find and replace
by Zaxo (Archbishop) on Dec 21, 2007 at 07:55 UTC | |
Re: find and replace
by vivid (Beadle) on Dec 21, 2007 at 09:36 UTC |