Page 1 of 1

How to identify dynamic string end with special characters.

Posted: Wed Nov 21, 2012 12:42 am
by jwei
I want to select a checkbox which shows dynamically, how can i use regular expression to capture it regardless the name.

example: @name='document_id[]', all names end with "_id[]". I use $ sign, but it does not.

Re: How to identify dynamic string end with special characters.

Posted: Wed Nov 21, 2012 5:50 am
by omayer
this might work
@name~'.*id[]'

Re: How to identify dynamic string end with special characters.

Posted: Wed Nov 21, 2012 1:22 pm
by Support Team
Hello,

Please try to use the following expression:

Code: Select all

@name~'.*_id\[\]$'
Special characters in regular expressions like [] have to be escaped by using a backslash.
Please take a look at our section RanoreXPath in our User Guide for more information.

Regards,
Markus (T)