Re: [PHP] Re: preg_replace problem

2009-06-14 Thread Andrew Ballard
On Sat, Jun 13, 2009 at 5:16 PM, Al wrote: > > > Al wrote: >> >> 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 s

Re: [PHP] Re: preg_replace problem

2009-06-14 Thread Mark Kelly
Hi. On Saturday 13 June 2009, Al wrote: > I may not have been very clear. Feed it just "test" with the > quotes. You should get back, "test" the same as you gave it. Instead, > I get back "e;test"e; Like Shawn, I have tried your code in isolation and only get the expected results. I loo

[PHP] Re: preg_replace problem

2009-06-13 Thread Al
Al wrote: 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("%&(?

[PHP] Re: preg_replace problem

2009-06-13 Thread Al
Shawn McKenzie wrote: Al wrote: 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.''; $valu

[PHP] Re: preg_replace problem

2009-06-13 Thread Al
Shawn McKenzie wrote: Al wrote: 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.''; $valu

[PHP] Re: preg_replace problem

2009-06-13 Thread Shawn McKenzie
Al wrote: > 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_

[PHP] Re: preg_replace problem (or possibly bug)

2006-03-08 Thread Rafael
What I see in the page you sent is a [url] "bbcode-tag" that is not closed (i.e. it has no [/url] or it's not displayed) If that's not the problem, could you send some example that isn't working (and some others that are working) Michael wrote: I am currently writing a forum system, but at

[PHP] Re: preg_replace problem

2006-03-01 Thread Rafael
Is there any special reason why you want to solve this with regular expressions? As far as I see, there's a couple of problems with your code, a) $file = dog.txt should be $file = 'dog.txt', b) $getOldValue has the _array_ resulting of parsing the INI file, hence you should write $getOldVa