From: Divya Badrinath Date: 2007-07-11T05:20:51+09:00 Subject: Help: Efficient regular expression string = "root 14051 14033 3 08:39 pts/2 00:00:00 /bin/bash" i need to fetch 14051 and /bin/bash from the string can someone help me to write an efficient regular expression for that. i am a beginner, i wrote string =~ /(\d+)\s+(\d+)\s+\d+\s+\d+:\d+\s+.*\s+\d+:\d+:\d+\s+(.*)\s/ i know this is not the efficient way of doing it. Please help. -- Posted via http://www.ruby-forum.com/.