Worksoft Community

Regular expression

Wiki Table of Contents

Page Details

Published by:
Yujira
on 22 Jul 2010
0 people found this article useful.

0% of people found this useful
Regular expression

Certain vertify actions, e.g., for an HTML ComboBox in Certify allows for "Matches expression" as a criteria.

To create an expression that ensure that the two pieces of data exist in the combobox item, a very basic regular expression such as: 709255\D*0001 will look for the 709255 number followed by 0 or more non-digit characters ending with 0001. If the customer want to guarantee a match to the whole string and not just a sub-string of the item, then a regular expression such as: ^0*709255\D*0001\D*$ can be used. This explicitly says starting from the beginning of the string, match 0 zero or more times followed by the 709255 number followed by zero or more non-digit characters followed by 0001 and explicitly ending with zero or more non-digit characters.

These are very simple expression that will match the input string provided as an example. This, however, is not the complex part of creating a regular expression which is that the expression created must not only match the desired item but NOT match on any other items in the list.

Here are several Microsoft documents discussing the regular expression syntax:

http://msdn.microsoft.com/en-us/library/ms974570.aspx

http://msdn.microsoft.com/en-us/library/6wzad2b2%28VS.85%29.aspx

 

 

Recent Comments

By: Mark Anthony A. Masikip Posted on 24 Aug 2011 5:06

Is this "Matches Expression" criteria only available for selected objects?  I cannot find this criteria for the SAP Status Bar.  Any suggestions?

By: Cynthia Libby Posted on 26 Aug 2011 8:12

Yes, it is only available for selected objects. What string are you trying to parse? The Status Bar has other options you can use to extract and check strings.

By: Mark Anthony A. Masikip Posted on 30 Aug 2011 12:38

Thanks Cynthia.  I'll look into this and check other available options.

©2009-2011 Worksoft, Inc.
Powered by Community Server (Non-Commercial Edition), by Telligent Systems