About Masks

Masks control the way characteristics (defined with a control type of Numeric or Text) are formatted and displayed in UIM.

  • The edit mask controls how text is formatted in editable fields, such as those that appear during creation or update.

  • The display mask controls how text is formatted in read-only fields.

You use Java regular expressions to define the edit and display masks. For example, to format the text as an IPv4 address, you could use the following regular expression for both masks:

\\d{3}.\\d{3}.\\d{3}.\\d{3}

Note:

When a user enters text in a field, only the text is stored in the UIM database. If you do not specify a display mask, the unformatted text is displayed in pages.

You can use the following Java regular expressions:

Characters, Predefined Character Classes, or Greedy Quantifier Description
x The character x
\\ The backslash character
\d A digit: [0-9]
\D A non-digit: [^0-9]
\s A whitespace character: [\t]
\w A word character: [a-z A-Z_0-9]
X? X, once or not at all
X* X, zero or more times
X+ X, one or more times

For additional information, see the Java regular expression documentation:

http://docs.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html

Related Topics

About Control Types