in reply to replacing text in specific tags
Assuming your text is stored in $_, you can do it in two lines. First line grabs the YYY info, second line substitutes the XXX. You may have to tweak the regexes depending on the precise specification.
my %data = m!<X-REF REFID="([^"]+)">([^<]+)</XREF>!g; s!<FTN ID="([^"]+)">[^<]+</FTN>!<FTN ID="$1">$data{$1}</FTN>!g;
Abigail
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: replacing text in specific tags
by texuser74 (Monk) on Aug 21, 2003 at 10:19 UTC | |
by Abigail-II (Bishop) on Aug 21, 2003 at 10:35 UTC | |
by texuser74 (Monk) on Aug 21, 2003 at 11:04 UTC | |
by CombatSquirrel (Hermit) on Aug 21, 2003 at 12:09 UTC | |
by texuser74 (Monk) on Aug 22, 2003 at 01:15 UTC | |
| |
by Abigail-II (Bishop) on Aug 21, 2003 at 11:12 UTC |