From: Richard Conroy Date: 2008-12-04T09:00:53+09:00 Subject: Re: Regular Expressions On Mon, Dec 1, 2008 at 7:08 PM, Mmcolli00 Mom wrote: > 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. I just simply have to pimp http://www.rubular.com/ I don't think that I have closed that browser tab containing it in weeks. Its killer feature is the ability to supply your own test data. http://www.rubular.com /^23430000.*CodeRed.*$/