Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #3041
| From | "A" <a@a.a> |
|---|---|
| Newsgroups | comp.lang.php |
| Subject | Re: php help |
| Date | 2011-09-01 00:48 +0200 |
| Organization | B.net Hrvatska d.o.o. |
| Message-ID | <j3mdp5$rve$1@gregory.bnet.hr> (permalink) |
| References | <a69ee922-56bf-4e13-bc28-8a6db69c4701@o26g2000vbi.googlegroups.com> |
> $newstring=preg_replace ("/â??/i", "",$newstring);
You didn't specify what these unknown characters should be.
I am guessing non-whitespace. In that case this would be appropriate:
$newstring=preg_replace ('/â\S\S/i', '',$newstring);
So that would match:
âabcer
But wouldn't match:
â asdasd
or...
âa sdasd
Note the "single" quotes (apostrophe) instead of your double quotes (that
don't need to escape backslash).
If you want to match anything then use:
$newstring=preg_replace ('/â../i', '',$newstring);
That would match any case of the above.
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
php help bob <bob@coolgroups.com> - 2011-08-31 15:23 -0700 Re: php help "A" <a@a.a> - 2011-09-01 00:48 +0200 Re: php help "Álvaro G. Vicario" <alvaro.NOSPAMTHANX@demogracia.com.invalid> - 2011-09-01 10:44 +0200
csiph-web