note 70521 added to function.ereg-replace

From: Date: Thu, 19 Oct 2006 15:04:32 +0000
Subject: note 70521 added to function.ereg-replace
Groups: php.notes 
Request: Send a blank email to php-notes+get-118770@lists.php.net to get a copy of this message
<?php $string="This, is: a' stri%ng\" \\ with lots% of ()punt*uation@!#^>!-_+=}{|/;`~><.,?&^ "; // strips a string of all punctuation $newString= trim(ereg_replace('[^A-Za-z0-9[:space:]]', '', $string)); // strips all punctuation except double quotes (usefull for search strings that may use google style double quotes to search for exact occurences. $newString= trim(ereg_replace('[^A-Za-z0-9"[:space:]]', '', $string)); ?> ---- Server IP: 64.71.164.2 Probable Submitter: 144.174.134.93 ---- Manual Page -- http://www.php.net/manual/en/function.ereg-replace.php Edit -- https://master.php.net/note/edit/70521 Del: integrated -- https://master.php.net/note/delete/70521/integrated Del: useless -- https://master.php.net/note/delete/70521/useless Del: bad code -- https://master.php.net/note/delete/70521/bad+code Del: spam -- https://master.php.net/note/delete/70521/spam Del: non-english -- https://master.php.net/note/delete/70521/non-english Del: in docs -- https://master.php.net/note/delete/70521/in+docs Del: other reasons-- https://master.php.net/note/delete/70521 Reject -- https://master.php.net/note/reject/70521 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#118770) next »