Skip to main content Skip to complementary content

Optional values

This section describes the behavior to expect when using the optional values available for the Matches function.

This example uses the following input data:

<book>
	<content>data...</content>
	<author>
		<auth1>Andrew Dornenburg</auth1>
		<auth2>Karen Page</auth2>
		<auth3>Michael Sofronski</auth3>
	</author>
	<press>123 Main Street
Traverse City, MI 49684</press>
	<year>2006-10-2</year>
</book>

The following map is created and uses the Matches function to check the data in the press element against a regular expression and return a Boolean.

When creating your regular expression, you can select three optional values:

Case sensitive

The Case sensitive option allows you to match text with a specific case.

For example, if you enter STREET in the Regex Value field and select the Case sensitive check box, it does not match the input data and returns a false value.

To get a true value, you would have to enter Street or clear the Case sensitive check box.

Ignore white space

The Ignore white space option allows you to ignore white space characters in the regular expression. This can be useful if you are creating a long regular expression and want to split it over several lines to make it more readable.

For example, if you enter Main Street and select the Ignore white space check box, a false value is returned, since the regular expression is looking for the text MainStreet.

To get a true value, you would need to clear the Ignore white space check box or to enter Main\sStreet as the regular expression.

Single Line

The Single Line option allows the dot to match all characters, including line breaks. If this check box is cleared, the multi-line mode is activated.

For example, if you enter Street.*City as the regular expression and select the Single Line check box, you get a true value, even though there is a line break between Street and City in the input data.

With the multi-line mode, you can use the caret and the dollar sign to match the start and the end of a line, respectively.

If you enter the regular expression Street$ and clear the Single Line check box, a true value is returned. But with the Single Line mode activated, the value is false.

Multiple lines can be detected with the default line separator \n.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!