Page 1 of 1
Default generated rxpath VS regular expression
Posted: Mon Jun 22, 2009 2:31 am
by marcushe
When we use RxSpy to snatch a object into repositry, the default rxpath is generated as below:
text[@caption~'^Do\ not\ power\ off\ during\ t']
Is the token '\ ' to represent a blank ? In standard regular expression ,we use '\s' to represent a blank.
Re: Default generated rxpath VS regular expression
Posted: Mon Jun 22, 2009 12:52 pm
by Support Team
The regular expressions used in RanoreXPath
are the standard .NET regular expressions. Usually, you do not need to escape white-spaces, however, the default behavior of the .NET
Regex.Escape method (that is used internally) is to escape white-spaces anyway. So, in RxPaths with regular expressions you can use " " and "\ " for white-spaces.
"\s" matches not only white-spaces, but also tabs, new lines, form feeds, and so on. Please, consult the MSDN documentation for more information:
http://msdn.microsoft.com/en-us/library/4edbef7e.aspx
Regards,
Alex
Ranorex Support Team
Re: Default generated rxpath VS regular expression
Posted: Tue Jun 23, 2009 1:36 am
by marcushe
Understand.