eregi question

From: Date: Mon, 26 Jun 2000 19:56:15 +0000
Subject: eregi question
Groups: php.general 
Request: Send a blank email to php-general+get-3185@lists.php.net to get a copy of this message
Taking my first hectic foray into Regular Expression stuff... $message=eregi_replace("<center>([[:alnum:]|[:space:]|[:punct:]]*)</center>","<tag>\\1</tag>",$message); Using the PHP eregi functions, I've been trying to capture everything between <center>and </center> - however, as you can probably see, this doesn't quite work like it's supposed to. For instance: <center> Bob </center> <b> Alice </b> <center> Bob </center> Actually ends up returning this: <tag> Bob </center> <b> Alice </b> <center> Bob </tag> Does anyone know how I can work around this problem? I've tried different variations of "any character class , but NOT EQUAL to </center>" but my syntax seems to be off. Thanks for any help. cz As Gregor Samsa awoke one morning from uneasy dreams he found himself transformed in his bed into a gigantic insect. Franz Kafka, The Metamorphosis

« previous php.general (#3185) next »