I am not shure what do you need. My guess is that you need to isolate
'id=89' from 'sub_viewvehicle.php?id=89&t=vehicle'. If you need
something else, let me know.

# try to find 'id=' followed with two digits (\d) in
'sub_viewvehicle.php?id=89&t=vehicle'
# 'sub_viewvehicle.php?id=89&t=vehicle' =~  /id=\d\d/
ie.link(:text, 'New Vehicle').href =~ /id=\d\d/

# string that matches is stored in variable $& (and yes, this is ugly
looking variable, and it has a nicer Ruby name, but I can not find it
now)
puts $&

Zeljko

2005/10/18, Roy Sin <[EMAIL PROTECTED]>:
> Hi All,
>
> Below is a sample of a href on a hyperlink
>
> <A href="sub_viewvehicle.php?id=89&t=vehicle">New
> Vehicle</A>
>
> How can I get the dynamic id?
>
> thanks
>
>
>
>
> __________________________________
> Yahoo! Mail - PC Magazine Editors' Choice 2005
> http://mail.yahoo.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