On 7/31/06, Esteban Manchado VeláÛquez <zoso / foton.es> wrote:
>
> But you're probably better off using regular expressions instead of fixed
> indices:
>
>     "#ip 127.0.0.1".sub(/^#ip\s+/, '') # => "127.0.0.1"

A prettier looking form, in this case, is

s = "#ip 127.0.0.1"
s[/^#ip /] = ''

martin