Thread
:
Regex Expressions
View Single Post
#
6
(
permalink
)
05-21-2008, 04:26 AM
KevinADC
Learning Programmer
Join Date: Jan 2007
Posts: 94
Credits:
0
Rep Power:
8
Re: Regex Expressions
The regexp works.
Code:
$string = '<![CDATA[this is a test]]>'; $string =~ s/<!\[CDATA\[(.*?)\]\]>/$1/gis; print $string;
The problem is more than likely because your pattern is spread over multiple lines. Post a sample of the real data.
KevinADC
View Public Profile
Send a private message to KevinADC
Find all posts by KevinADC