regex capturing with assignment.  Capture your string or number in the 
From field using parenthesis to capture and assign:  /(\d+)/
...then compare the assigned value, which is $1, with the next string

Sorry to do this to your all, but this is a quick Perl example I just 
whipped up, but is easy to convert to Ruby:

perl -le '$x = "12345"; $y = "123465";
 if ( $x =~ /(\d+)/ ) {
     if ( $y == $1 ) {
         print "yep"
     }
     else {
         print "nope!"
     }
 }
'

-- 
Posted via http://www.ruby-forum.com/.