This preg_replace() should simply replace all with amp; unless the value
is already amp;
But; if $value is simple a quote character [] I get quote. e.g., test =
quote;testquote;
Search string and replace works as it should in Regex_Coach.
echo $value.'br /';
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
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 but for
$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 =
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 =
On Tue, 17 Jun 2003 07:25:00 -0400, Vincent Bouret wrote:
I want A dog jumped over a ladder to become xyzA/xyz dog jumped over
xyza/xyz ladder.
How about this...
$str = A dog jumped over a ladder;
$str = preg_replace( /(^| )(a)( |$)/i, $1xyz$2/xyz$3, str );
--
PHP General Mailing List
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 xyzA/xyz dog jumped over
You need \b = word boundary.
$string=preg_replace(/\\b($word)\\b/i,'xyz\1/xyz', $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
Hello,
?php
$parsed = preg_replace(/(\ba\b)/i,tag\\1/tag,$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
where am i going wrong
i used
$mail = preg_replace(/p[^]*?/i,\n\n$0, $mail,-1);
and
$mail = preg_replace(/p[^]*?/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]
-
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
11 matches
Mail list logo