On Thu, 11 Apr 2002, Dave Thomas wrote:

> Tobias Reif <tobiasreif / pinkjuice.com> writes:
>
> > irb(main):045:0> 'http://www.hotpita.net'.sub /http:\/\//,''
> > to get
> > "www.hotpita.net"
> >
> > . What else could I use?
>
> How about:
>
>      irbsh(main):001:0> a = 'http://www.hotpita.net'
>      irbsh(main):002:0> a['http://'] = ''
>      irbsh(main):003:0> a
>      "www.hotpita.net"

That is an interesting one....

This seems to work:

neelix hgs 51 %> irb
irb(main):001:0> a="http://www.hopita.net"
"http://www.hopita.net"
irb(main):002:0> a.sub "http://",""
"www.hopita.net"
irb(main):003:0>

which overcomes the main \/ problem.
>
>
> Dave
>
        Hugh