in reply to regex replace using position loop
open 895570.xml ; my $fullout ; for funcCall/*[name()!='funcName'] { if (name()='rhsValue' and .='crlf') { $out = "" ; } elsif (name()='symConstant' and .='| |') { $out = " " ; } else { $out = (.) ; } ; $fullout .= $out ; } echo :s '<' (funcCall/funcName) ' string="' $fullout '"/>' ;
|
|---|