If you change the regular _expression_ from
/[0-9]{8}-[0-9]/
to
/([0-9]{8}-[0-9])/
then after the match, the variable $1 will contain the
contents of the matched string.
---Michael B.
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jon Passmore
Sent: January 5, 2006 6:21 PM
To: [email protected]
Subject: [Wtr-general] Newbie - How to get value found by searching forregular _expression_?
example: I add a record and it returns a page with a dynamically generated ID. The value does not have any tags that will help me locate it so I have to search using a regular _expression_. pageContainsText(/[0-9]{8}-[0-9]/)
This works great, but what do I do if I want to return that value and assign it to a variable?
_______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general
