Page 1 of 1

Xpath not case sensitive

Posted: Fri Sep 30, 2011 12:53 pm
by swmatisa

Code: Select all

tree/treeitem[@accessiblename=$machine]
My problem is that I need a non case sensitive equality with the variable($machine) content. Is this possible?

I see that there is regex, but how put the variable $machine in the regex?

Thans for your help

Regards

Re: Xpath not case sensitive

Posted: Fri Sep 30, 2011 3:49 pm
by Ciege
Try something like this:

Code: Select all

tree/treeitem[@accessiblename~'" + machine + "']

Re: Xpath not case sensitive

Posted: Tue Oct 04, 2011 7:48 am
by swmatisa
Hello,

The working solution is:

Code: Select all

tree/treeitem[@accessiblename~'(?i:'+$machine+')']