Re: Perl script does not work
- From: Gunnar Hjalmarsson <noreply@xxxxxxxxx>
- Date: Sat, 29 Apr 2006 20:20:16 +0200
CSUIDL PROGRAMMEr wrote:
It changes the following pattern in xml files
<!CDATA[slaaam]]> TO
<slaaam>
But it does not work. Any reasons
Yes, the regex doesn't match.
$line =~ s/<!\[CDATA\[([^\]]*)\]\]>/$1/ig;----------------------^^
Try
$line =~ s/<!CDATA\[([^\]]*)\]\]>/<$1>/ig;
--------------------------------------^--^
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
.
- References:
- Perl script does not work
- From: CSUIDL PROGRAMMEr
- Perl script does not work
- Prev by Date: Re: Perl script does not work
- Next by Date: Class::Struct array assignment and access
- Previous by thread: Re: Perl script does not work
- Next by thread: Re: Perl script does not work
- Index(es):
Relevant Pages
|