Message-ID: <1224674489.15796.1711696535783.JavaMail.appbox@confluence> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_15795_1084293774.1711696535783" ------=_Part_15795_1084293774.1711696535783 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html Expr Pattern Matching

Expr Pattern Matching

Expr language allows you to check text values against a certain = pattern, when using the MATCH, CASE= REPLACE or SEARCH function. 

There are three types of patterns that can be used: Exact Matching, Wildcard Matching, and R= egular Expression Matching.

Exact Matching

This is the simplest pattern type, which compares value aga= inst an exact text value:

Although it's called "exact matching", there are some additional rules t= hat make the matching easier:

Exact matching is used by default, unless the pattern is recognized as r= equiring Wildcard or Regular Expression matching.

Wildcard Mat= ching

Wildcard patterns let you use the wildcard symbol "*" to sp= ecify any number of any characters (including no characters).

The above function would return "1" for any value that started with the = characters "App" =E2=80=93 so "App", "Apple" and "Apples are good for you" = would all match. You can also use multiple asterisks to build your pattern.= Match(value, "A*L*") would match anything that starts with an= A and contains an L, including "Apples", "Almanac" and "Aunt Sal".

Wildcard matching uses the same rules as exact matching:

Wildcard matching is used when the pattern is not recognized to be a Reg= ular Expression Pattern but contains at least one asterisk.

Regul= ar Expression Matching

This type of matching lets you use powerful regular expressions to speci= fy exactly what you need to match with.

  • MATCH(value, "/^Ap+.*s$/")

Structure uses regular expressions available with Java. For full documen= tation about the regular expression language, see Java documentation for Pattern.

The regular expression matching is different from other types of matchin= g. The following rules apply:

  • Leading and trailing whitespace characters are not removed.
  • Text comparison is case-insensitive, like with the other types of match= ing.
  • The value does not have to fully match the pattern =E2=80=93 it is= sufficient that at least one occurrence of the pattern is found in the val= ue. To make your pattern match the whole text, use "^" and "$" characters i= n the pattern.

Regular expression matching is turned on if the first and the last chara= cters of the pattern are "/". (These characters are removed, a= s they are not a part of the pattern.)

 

 

------=_Part_15795_1084293774.1711696535783--