Help for regex

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Help for regex

Massimo Miccoli
Hi,

I need some help to skip host name like :
http://new-orleans-gay-men-bondage.xx.toplesss.info

Or

http://www.new-orleans.super-hotels.net/

Can help me to make a regex that remove hosts (not url part) with
multiple hyphen?

Thanks,

Massimo





Reply | Threaded
Open this post in threaded view
|

Re: Help for regex

Fredrik Andersson-2-2
Hello Massimo.

"*-.*-.*-.*" would match anything with three dashes or more in it, for
instance. Another more good-looking way would be to use something like
".*(-.*){a,b}",
which will match anything with a < number of dashes < b.

Fredrik

On 9/6/05, Massimo Miccoli <[hidden email]> wrote:

>
> Hi,
>
> I need some help to skip host name like :
> http://new-orleans-gay-men-bondage.xx.toplesss.info
>
> Or
>
> http://www.new-orleans.super-hotels.net/
>
> Can help me to make a regex that remove hosts (not url part) with
> multiple hyphen?
>
> Thanks,
>
> Massimo
>
>
>
>
>
>