Show/Hide Toolbars

Navigation: Appendices > String pattern matching

Simple wildcard patterns

Scroll Prev Up Next More

Simple wildcard patterns are used in different parts of the Application Server for simple and easy to understand matching (=specifying and recognizing) strings of text.

Wildcard

Description

*

Matches zero one or more characters

?

Matches a single character

Table 1: Characters with special meaning in a simple wildcard patterns

Following rules apply to wildcard patterns

There can be more than one wildcard in a single search pattern, and the two wildcard characters can be used in combination. For example, m*?? will match words starting with m with three or more characters.

A pattern not including any wildcard character will search for an exact match.

Wildcard patterns are case insensitive

you want to search for * or ?, i.e. if you do not want those characters to be interpreted as wildcards you can escape them using the backslash \* or \?

** is logically equal to *

Examples:

m* will match every string with length ≥ 1 starting with m or M

m?* will match every string with length ≥ 2 starting with m or M

*m will match every string with length ≥ 1 ending with m or M

?m will match every string with length 2 where the second character is  m or M

\?m will match the string ?m

© 2021 AFRY Austria GmbH, www.redbex.com