I'm trying to work on xml without loading the xml parsing bits. Here's what I've got so far
Now, according to me this should just take out the third solaris node but the result is the whole thing is deleted.
I've tried looking everywhere and I'm assured that the .*? pattern is non gready list of any characters. What am I doing wrong?
On the internet no one knows you're a dog
Columb Healy
Code:
#!/usr/bin/perl -w
use strict;
my $string2 = '
<node description>
<hook>
<text> Blurb about Red Hat
</text>
</hook>
</node>
<node second node>
<hook>hooky AIX thing
</hook>
</node>
<node third node>
<hook>hooky solaris thing
</hook>
</node>';
$string2 =~ s/\<node.*?Solaris.*?\<\/node\>/replacement /msi;
print $string2;
I've tried looking everywhere and I'm assured that the .*? pattern is non gready list of any characters. What am I doing wrong?
On the internet no one knows you're a dog
Columb Healy