|
Posted by Sam on 01/28/07 21:08
When I do
$domainName = "google.com";
$res = ereg('#^(([a-z0-9][-a-z0-9]*?[a-z0-9])\.)+[a-z]{2,6}$#',
$domainName)
res was false :( and I got this warning
Warning: ereg() [function.ereg]: REG_BADRPT
Thanks
On Jan 28, 4:50 am, "Sagari" <konstan...@boyandin.ru> wrote:
> There's also '.museum' TLD, e.g.
>
> example.museum
>
> Non-national domain names can only have digits, Latin letters and a
> dash in them; dash can't be first or last character. So you can begin
> with this pattern:
>
> #^(([a-z0-9][-a-z0-9]*?[a-z0-9])\.)+[a-z]{2,6}$#
>
> That will match all valid 3-rd or higher level domain names as well
>
> However, national domain names can have non-ASCII letters.
>
> Best wishes,
>
> Konstantin
>
> On 28 ñÎ×., 02:12, "Sam" <m.shan...@gmail.com> wrote:
>
>
>
> > yes sure
>
> > so any one have the pattren to check?
>
> > On Jan 27, 10:17 pm, bill <nob...@spamcop.net> wrote:
>
> > > Sam wrote:
> > > > Validate domain name context
>
> > > > Hello , Today I want to make sure from a given text is a domain style
> > > > or not.
>
> > > > for example : the domain can be
>
> > > > example.com or example.com.us or example.us so , what is the pattren
> > > > to check the given string is a domain style or not?
>
> > > > note that the first text must be at least 2 chars and the second text
> > > > may be 2 or 3 chars and the last text must be 2 chars or null.
>
> > > > Thanks,
> > > > Sam Shannaqcan also be example.info
>
> > > bill- Hide quoted text -- Show quoted text -- Hide quoted text -- Show quoted text -
[Back to original message]
|