From: kotin 76 Date: 2011-07-28T14:57:31+09:00 Subject: siimple string manuplation logic. But i did not getting correct one Hi All, I am new for ruby. from below program i am trying to print /media/4B22-5451 ( i mean from /media to end of that word). But i am able to print only up to /media/4B22. please any once can help me to print upto /media/4B22-5451 ####################################################################### string1 = "/dev/sdb 1949612 102404 1847208 6% /media/4B22-5451" if m2=string1.match( %r{/media/\w+} ).to_s then if m2 =~ %r{/media/} then puts "pass" puts "mediastring = #{m2}" end end ####################################################################### I would appreciate any answer. Regards Kotin -- Posted via http://www.ruby-forum.com/.