in reply to No tools? Use Perl?!
Hello Boyd.Ako, and welcome to the Monastery!
It seems you’re missing a forward slash in the terminating regex:
print if (/^\<ReportHost/../^\<\/ReportHost>/); # ^
BTW, you don’t need to backslash the < character. Also, the regex will be easier to read if you change the delimiters, so that you don’t have to backslash the forward slash character:
print if m{^<ReportHost>} .. m{^</ReportHost>};
Note that the ^ metacharacter in a regex matches the beginning of a line. Is this what you want? It would be safer to match any occurrences of <ReportHost> and </ReportHost> wherever they occur within the XML document (i.e., leave out the ^ characters).
Hope that helps,
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: No tools? Use Perl?!
by Boyd.Ako (Novice) on Jul 29, 2016 at 01:46 UTC | |
by AnomalousMonk (Archbishop) on Jul 29, 2016 at 02:28 UTC | |
by Athanasius (Archbishop) on Jul 29, 2016 at 02:36 UTC |