Re: problems with regex
| From: | Merlin | Date: | Sat, 27 May 2006 14:47:01 +0000 |
| Subject: | Re: problems with regex | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-237007@lists.php.net to get a copy of this message | ||
thank you, that worked excellent!
Merlin
Dave Goodchild schrieb:
On 27/05/06, Merlin <ngroups@fastmail.fm> wrote:Hi there, I am somehow lost when it comes to regex. I am trying to remove ! and ? characters from a string. Could somebody please help me to get a working regex running for that? I tried: $str = preg_replace('/\!\?\./', ' ', $str);How about $str = preg_replace('/(\!|\?)+/', $str);