Re: Re: Regular expression: How do I allow forward slashes?

Sven Riedel
Sat, 19 Dec 2009 09:20:14 -0000

Sven Riedel wrote:
> /^http:\/\/myhostname\.com\/foo$/i
>
> would become
>
> %r{http://myhostname\.com/foo}i

And of course I forgot the anchors in the second example. So the correct
version is:

%r{^http://myhostname\.com/foo$}i