note 78145 added to function.ereg-replace

From: Date: Sun, 30 Sep 2007 01:27:03 +0000
Subject: note 78145 added to function.ereg-replace
Groups: php.notes 
Request: Send a blank email to php-notes+get-130940@lists.php.net to get a copy of this message
It's worth mentioning for ultimate clarity that you're safest using double quotes when matching a pattern, since without them, metacharacters will be interpreted as a backslash plus another character. Granted, this is part of the language syntax for the string type, but it might not be quite so obvious when dealing with patterns in this function, which is taking the pattern as a parameter. So if you find that '[\n]' is taking the 'n' out of your string and leaving the new lines alone, switch to doubles before changing anything else. ---- Server IP: 69.147.83.197 Probable Submitter: 71.185.58.7 ---- Manual Page -- http://www.php.net/manual/en/function.ereg-replace.php Edit -- https://master.php.net/note/edit/78145 Del: integrated -- https://master.php.net/note/delete/78145/integrated Del: useless -- https://master.php.net/note/delete/78145/useless Del: bad code -- https://master.php.net/note/delete/78145/bad+code Del: spam -- https://master.php.net/note/delete/78145/spam Del: non-english -- https://master.php.net/note/delete/78145/non-english Del: in docs -- https://master.php.net/note/delete/78145/in+docs Del: other reasons-- https://master.php.net/note/delete/78145 Reject -- https://master.php.net/note/reject/78145 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#130940) next »