Thank you, ANu. It works.

On Apr 8, 6:40 pm, ANu Gangavaram <anuwri...@gmail.com> wrote:
> When using regular expression with a variable, the syntax is /#{str}/
>
> On Wed, Apr 8, 2009 at 9:30 PM, vladimir...@hotmail.com <
>
>
>
> vladimir...@hotmail.com> wrote:
>
> > I have a string
> > obj_url = "http://crisp.adoc.xerox.com:8080/docushare/dsweb/Get/
> > Document-77/"
> > and need to extract 77.
>
> > This code works perfect:
> > handle = /.*Document-(.*)\//.match( obj_url )
> > puts handle[ 1 ] # returns 77
>
> > but this code does not work:
> > obj_type = "Document"
> > str = '.*' + obj_type +'-(.*)\/'
> > handle = /str/.match( obj_url )
>
> > Please, help.
> > Thanks,
> > Vladimir- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

Reply via email to