using perl
Hi All, i was wondering if anyone can solve how to extract the full tag from the xml line ie not sure what to put in the m// to get the string
"/data/TOP471//context_data/instruments.txt"
I basically want the above filename in a variable for further processing...
$_ =" <file>/data/TOP471//context_data/instruments.txt</file> ";
if (m//) {
print '$+{xx} contains' . " $+{xx}\n";
} else {
print "No match: |$_|\n";
}
Any help greatly appreciated!
Regards
Satnam
---------- Post updated at 09:01 PM ---------- Previous update was at 08:56 PM ----------
sorry should have been:
$_ =" <file>/algodata/TOP471/dynamic.20110301.1301.ProductSCR.20002/ara/MarketRisk/data_ara/context_data/instruments.txt</file> ";
if (m//) {
print "Matched: |$`<$&>$'|\n"; # the special match vars
} else {
print "No match: |$_|\n";
}