S
steeve_dun
Hi,
I want to make some pattern replacement. ie to delete every thing
that's between 2 tags.
For example for
1<tag> 2</tag>3
x<tag> a<tag> b </tag> c</tag>z
I want to get
1 3
x z
But I have a problem with embeded tags.
I've tried :
$text =~ s/\<tag\>(.*?)\<\/tag\>//sg;
but it doens't work for embeded tags. It gives:
13
x c</tag>z
Is there a way to deal with this?
Thank you
-steeve
I want to make some pattern replacement. ie to delete every thing
that's between 2 tags.
For example for
1<tag> 2</tag>3
x<tag> a<tag> b </tag> c</tag>z
I want to get
1 3
x z
But I have a problem with embeded tags.
I've tried :
$text =~ s/\<tag\>(.*?)\<\/tag\>//sg;
but it doens't work for embeded tags. It gives:
13
x c</tag>z
Is there a way to deal with this?
Thank you
-steeve