Comments
Last comments for preg_replace()
On 09. Jun 2017 03:26 greatfull wrote:
Thank that was very helpful. your site made it to my favorite list.
On 16. Oct 2014 12:15 zxcat wrote:
array() in $pattern doesn't work here
On 24. Jun 2014 18:58 Florian wrote:
Nice tool, good job :) One small remark though. If you try to use backreference it wont work as you'd expect, here is the code generated for these values: $pattern => /the (dog|rat|duck) is ill/ $replacement => A \${1} is running $subject => the dog is ill preg_replace('/the (dog|rat|duck) is ill/', 'A \\${1} is running', 'the dog is ill', -1, $count); It fails because the $replacement (i.e 'A \\${1} is running') is set between simple quotes and not double quotes, also because of the backslash added.
On 16. May 2014 09:48 Mira wrote:
@butzi: Thank you. You are right. Works now perfect.
On 04. May 2014 17:00 butzi wrote:
@Mira: Please take a look at the manual. The $pattern ist required to be encapsulated in some special characters (mostly @ or / is used). Anyway else you get the error message.
On 04. May 2014 16:52 Mira wrote:
Great Tool But with: array('~([0-9]{4})_([0-9]{2})_([0-9]{2})__?([0-9]{2})_([0-9]{2})_([0-9]{2,3})(.*)~','~([0-9]{4})-([0-9]{2})-([0-9]{2}) ?([0-9]{2})[.]([0-9]{2})[.]([0-9]{2,3})(.*)~') I get ERROR: Delimiter must not be alphanumeric or backslash It comes from the {2,3} parts. About me this would be correct. Tested in real php. There no error happens. Mira
On 10. Oct 2013 10:10 Webmaster wrote:
Very clean and clear website and no advertisement, nice! And thanks for supporting HTML in expressions, well done!