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:37:49 +0100
- From: Josh Glover <jmglov@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> <4D663EAB.7000800@example.com>
On 24 February 2011 12:19, Peter Brandt <me387511@example.com> wrote: > Dave M G wrote: > >> 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! His . is inside a character class, where it becomes literal. The proof is in the (irb) pudding: >> 'f' =~ /[.]/ => nil >> '.' =~ /[.]/ => 0 -- Cheers, Josh
- Follow-Ups:
- Re: [tlug] Do you whitelist or blacklist utf-8? [SOLVED]
- From: Peter Brandt
- 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
- Re: [tlug] Do you whitelist or blacklist utf-8? [SOLVED]
- From: Peter Brandt
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] Do you whitelist or blacklist utf-8?
- 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