From: Robert Klemme Date: 2006-04-18T18:55:12+09:00 Subject: Re: how i can get value in string with pattern 2006/4/18, Jakov : > how i can get value in string with pattern or regular experssion > > I have this string: > > "Who is this (//mystring//)".gsub(?, "") > > How i can get 'mystring' if it's conclude in mystring. p "Who is this (//mystring//)".scan(%r{//(\w+)//}).map{|m| m[0]} s = %r{//(\w+)//} =~ "Who is this (//mystring//)" && $1 p s Cheers robert -- Have a look: http://www.flickr.com/photos/fussel-foto/