J. Allen Day wrote:
> "ZOLTAN" <zoltan.jose gmail.com> wrote:
> >
> >
> >Hi,
> > I am quite a newbie in the magnificent world of
Regular Expressions
> >but I'm already hooked! Can someone please suggest
t me what's wrong
> >with this regex?
>
> In this case, your problem is that you don't have a
quantifier after that
> last character class before the closed parenthesis, so
it's only looking
> for 2 characters after the dot.
>
> www(\.[a-z][a-z0-9]+)+\.[a-z]+
>
> That simple change and it will match all the domains,
but naturally nothing
> after.
>
> See her in action: http://tinyurl.com/eb7r5
>
> Allen
>
> --
> Remember, no matter where you go, there you are.
-Buckaroo Banzai
> Online Regex find/repalce utility: http://rereplace.com
> Command-based online image editor: http://theprawn.com/imag
iine
Hi Allen,
I was just trying out on my own and got this one to work
:
$ egrep -i '(http://)?(www)?(\.[a-z][a-z0-9]*)+\.[a-z]+'
testfile
This works great for all domain types.... But I still have
one query
yet :
When I tried using this :
$ egrep -i
'(http://)?(www)?(\.[a-z][a-z0-9]*)+\.[a-z]{2,4)'
testfile
where I am using the {min,max) format to ensure that the
final domain
suffix is between 2 and 4 characters, there was no output.
Is this
feature not supported in egrep 2.5.1? If so, how do I ensure
this to be
enforced using egrep?
And thanks a lot for the pointer. Truly appreciated.
Regards,
Timmy Jose.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Regex" group.
To post to this group, send email to regex googlegroups.com
To unsubscribe from this group, send email to
regex-unsubscribe googlegroups.com
For more options, visit this group at http://groups.go
ogle.com/group/regex
-~----------~----~----~----~------~----~------~--~---
|