Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] Do you whitelist or blacklist utf-8? [SOLVED]
- Date: Thu, 24 Feb 2011 12:19:07 +0100
- From: Peter Brandt <me387511@example.com>
- Subject: Re: [tlug] Do you whitelist or blacklist utf-8? [SOLVED]
- References: <4D639689.1010302@example.com> <4D63EFBC.1020900@example.com> <4D64C5DD.1040607@example.com> <4D64CB49.10906@example.com> <4D652AF5.10304@example.com> <4D655712.1090608@example.com> <37687.61.213.3.170.1298510044.squirrel@example.com> <4D661A15.8010009@example.com> <AANLkTikCD+G4k1J58UTfns8VEr=ipHgn+vaEVLsy8RUJ@example.com> <4D66393A.7060402@example.com>
- User-agent: Thunderbird 2.0.0.0 (Macintosh/20070326)
Hi Dave Dave M G wrote:TLUG, function hasOnlyWhitelistedCharacters($string) { // return TRUE to say "only whitelisted characters" return preg_match('/^[\p{L}\p{N}\p{Z}.@example.com/u', $string); }Be careful with the "." in your Regexp. The "." matches *any* character, so the above function will return TRUE for any String that contains at least one character, whatever it is!Use "\." instead of "." to match a real "period". Peter
- Follow-Ups:
- Re: [tlug] Do you whitelist or blacklist utf-8? [SOLVED]
- From: Dave M G
- Re: [tlug] Do you whitelist or blacklist utf-8? [SOLVED]
- From: Josh Glover
- References:
- [tlug] Do you whitelist or blacklist utf-8?
- From: Dave M G
- Re: [tlug] Do you whitelist or blacklist utf-8?
- From: Shmuel Fomberg
- Re: [tlug] Do you whitelist or blacklist utf-8?
- From: Dave M G
- Re: [tlug] Do you whitelist or blacklist utf-8?
- From: Shmuel Fomberg
- Re: [tlug] Do you whitelist or blacklist utf-8?
- From: Dave M G
- Re: [tlug] Do you whitelist or blacklist utf-8?
- From: Shmuel Fomberg
- Re: [tlug] Do you whitelist or blacklist utf-8?
- From: Nikolay Elenkov
- Re: [tlug] Do you whitelist or blacklist utf-8?
- From: Darren Cook
- Re: [tlug] Do you whitelist or blacklist utf-8?
- From: Josh Glover
- Re: [tlug] Do you whitelist or blacklist utf-8? [SOLVED]
- From: Dave M G
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] Do you whitelist or blacklist utf-8? [SOLVED]
- Next by Date: Re: [tlug] Do you whitelist or blacklist utf-8? [SOLVED]
- Previous by thread: Re: [tlug] Do you whitelist or blacklist utf-8? [SOLVED]
- Next by thread: Re: [tlug] Do you whitelist or blacklist utf-8? [SOLVED]
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links