From: William James Date: 2005-08-15T15:46:14+09:00 Subject: Re: YANQ (yet another newbie question): "string"[0.."e"] basi wrote: > Hello, > > Is there a way to say in Ruby: > > "astring"[0../r/] #"ast" > "astring"[/ast/..-1] #"ring" Another approach is to remove what you don't want: "astring".sub(/r.*/,'') --> "ast" "astring".sub(/^ast/,'') --> "ring"