This preg_replace() should simply replace all "&" with "&" unless the value
is already "&"
But; if $value is simple a quote character ["] I get ""e". e.g., "test" =>
"e;test"e;
Search string and replace works as it should in Regex_Coach.
echo $value.'';
$value=preg_replace("%&(?!amp;)%i", "&
On 3/8/06, Michael <[EMAIL PROTECTED]> wrote:
> I am currently writing a forum system, but at the moment I have a bug
> that no one can seem to get to the root cause of. Basically I am using
> preg_replace with the pattern as "'\[url=(.*?)\](.*?)\[/url\]'is".
> However for most links it works fine
I am currently writing a forum system, but at the moment I have a bug
that no one can seem to get to the root cause of. Basically I am using
preg_replace with the pattern as "'\[url=(.*?)\](.*?)\[/url\]'is".
However for most links it works fine but for others it just doesn't
render the bbcode to a
Benjamin Adams wrote:
$file = dog.txt;
$today = date("Ymd");
function incDate($new, $date){
//$date = settype('int');
return $new.($date++);
}
$getOldValue = parse_ini_file($file, 1);
$newValue = $getOldValue[$today] + 1;
$oldDate = $today . " = ". $newValue;
$newDate = preg_rep
$file = dog.txt;
$today = date("Ymd");
function incDate($new, $date){
//$date = settype('int');
return $new.($date++);
}
$getOldValue = parse_ini_file($file, 1);
$newValue = $getOldValue[$today] + 1;
$oldDate = $today . " = ". $newValue;
$newDate = preg_replace('/(\d+\s\=\s)(\d+)
On Tue, 17 Jun 2003 07:25:00 -0400, Vincent Bouret wrote:
>I want "A dog jumped over a ladder" to become "A dog jumped over
>a ladder".
How about this...
$str = "A dog jumped over a ladder";
$str = preg_replace( "/(^| )(a)( |$)/i", "$1$2$3", str );
--
PHP General Mailing List (http://www.php
Hello,
\\1",$sourcestring);
?>
should do the job.
regards
Am Die, 2003-06-17 um 13.25 schrieb Vincent Bouret:
> Hi,
>
> I am having this problem with preg_replace. I want the following thing but I
> can't understand what regular expression I should put.
>
> I want to replace all occurences o
You need \b = word boundary.
$string=preg_replace("/\\b($word)\\b/i",'\1', $string);
Vincent Bouret wrote:
Hi,
I am having this problem with preg_replace. I want the following thing but I
can't understand what regular expression I should put.
I want to replace all occurences of a given **whole**
Hi,
I am having this problem with preg_replace. I want the following thing but I
can't understand what regular expression I should put.
I want to replace all occurences of a given **whole** word into a string.
For example:
I want "A dog jumped over a ladder" to become "A dog jumped over
a ladde
where am i going wrong
i used
$mail = preg_replace("/]*?>/i","\n\n$0", $mail,-1);
and
$mail = preg_replace("/]*?>/i","\n\n\\1", $mail,-1);
but i get $0 or \1 inserted, but only on the linux server
not on my win 2000 dev machine!
Paul Roberts
[EMAIL PROTECTED]
- Ori
On Thu, 18 Jan 2001, The Captain wrote:
> I have a regular expression that's not giving me the results i really need.
>
> I have a bunch of strings coming at me that need to be truncated if they're
> over 15 characters... but not to truncate until after it reaches the first
> word.
>
> This regul
I have a regular expression that's not giving me the results i really need.
I have a bunch of strings coming at me that need to be truncated if they're
over 15 characters... but not to truncate until after it reaches the first
word.
This regular expression just doesn't seem to want to work 100%:
12 matches
Mail list logo