RegExp Help: [:cntrl:] not working
| From: | Monty | Date: | Thu, 11 Jul 2002 22:41:28 +0000 |
| Subject: | RegExp Help: [:cntrl:] not working | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-107260@lists.php.net to get a copy of this message | ||
I'm trying to preg_split() text between "<page>". I used the following but
can't get the regular expression to work:
$content = "blah blah <page> blah blah blah";
$paged = preg_split( "[[:cntrl:]*]<page>[[:cntrl:]*]", $content );
I also tried the following...
$content = "blah blah <page> blah blah blah";
$paged = preg_split( "[:cntrl:]<page>[:cntrl:]", $content );
...and...
$content = "blah blah <page> blah blah blah";
$paged = preg_split( "[[:cntrl:]]<page>[[:cntrl:]]", $content );
But none of these work. Can someone tell me what's wrong? I just want to
split the text on "<page>" and include any line feeds that may have been put
in before or after the "<page>" text.
Thanks.