From: Mmcolli00 Mom Date: 2008-12-02T04:08:14+09:00 Subject: Regular Expressions Hi everyone. Just a question about regualar expression in Ruby. Is there a way to check in each line of a document for always beginning with "23430000" and somewhere on that same line another string 'CodeRed'? line1: 23430000 @#$#$3455000CodeRed 24AAWERE 740000000 This is what I have so far when I import each textdata from another file. textdata.should =~ /23430000/ |CodeRed/ ...the pipe was supposed to determine if CodeRed exists somewhere after the identity code 23430000. However, it doesn't work like this. Also for my code I am not using OR logic with it. -- Posted via http://www.ruby-forum.com/.