still it returns nil. the whole text I'm searching for is 1-25/25. but of 
course this is dynamic. Does $& by any chance interprets and computes 1-25/25 
as nil instead?

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Bret Pettichord
Sent: Tuesday, September 13, 2005 12:34 PM
To: [email protected]
Subject: RE: [Wtr-general] check what's the content of this certain text


At 10:14 PM 9/12/2005, [EMAIL PROTECTED] wrote:
>hi I used this...
>
>if $ie.contains_text("/25") then puts $& end
>
>but it returns nil. don't know why. I'm assuming it will return /25 or 
>rather the whole text.

You have to use a regular expression:

   $ie.contains_text(/\/25/); puts $&

(You have to back-quote the slash.)

_____________________
  Bret Pettichord
  www.pettichord.com

_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to