Skip to content

Regular Expressions

Purpose

A regular expression is a sequence of characters that describes how to construct a set of strings.  It is composed of character literals and special characters. Each character literal represents one single character (such as "a", "b", "C", "1").  The special characters can represent a character, many characters, or a choice about how to select characters.

Usage

In Rapise, you must prepend regular expressions with the string regex:.  So the regular expression describing all strings would be: regex:.*

There are three uses for regular expressions in Rapise: (1) in Object Locators, (2) in action overriding code, (3) in Custom Libraries.

Examples

In Object Locator to match a dynamic Window Title:

window title

regex:.*Microsoft Dynamics NAV matches any Window Title ending with Microsoft Dynamics NAV, e.g.

1
Posted Sales Shipments - Microsoft Dynamics NAV

or

1
Sales Invoices - Microsoft Dynamics NAV