Re: Regular Expressions (PCRE library)

From: Date: Sat, 03 Aug 2002 21:46:22 +0000
Subject: Re: Regular Expressions (PCRE library)
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-110999@lists.php.net to get a copy of this message
No im not saying that, im merely saying that in my given example even if i turn the Hello into Ello it does not replace it, besides : ******************************************** ^ = assert start of subject (or line, in multiline mode) * ******************************************** I took this directly from the PHP manual, so i assumed that the default mode would be the first one, however, i tried the following and it looks like it was the latter after all $test = "ello, end this is now the End."; $test = preg_replace('# *^e#i', 'A', $test); Will result into : Allo, end this is now the End. So, i guess you were right after all :) Thanks for sticking with me though! Best regards from Vienna, Jürgen > So you're saying this: > > echo preg_replace("/^[eE]/", "A", "Eek!"); > > Does not result in "Aek!" ? > > -- > Jason Wong

« previous php.general (#110999) next »