Match to Regular Expression
Logic name
Match to Regular Expression (Document Mapper/Variable Mapper)
Function
This logic determines whether the input string matches the specified regular expression.
Data types
|
Location |
Type |
|---|---|
|
First input handler |
String |
|
Logic output |
Boolean |
For details, refer to Logic specifications (Document Mapper/Variable Mapper).
Properties
|
Category |
Property |
Description |
|---|---|---|
|
Required settings |
Regular expression pattern |
Specify the regular expression pattern. |
|
Null processing |
Null option |
Specify how to handle the input if it contains null. |
|
Comment |
Comment |
You can write a description of the logic. It doesn't affect the conversion process. |
Null option
|
Option |
Description |
|---|---|
|
Return false in case of null |
Outputs false if value of the input handler is null and continues with the process. |
|
Convert null into empty string |
Converts null to an empty string and continues with the process. |
|
Throw exception when unable to determine/calculate/process |
Throws an exception (CalculationException) and stops the processing when the system is unable to determine/calculate/process. |
|
Output null if the input is null |
Outputs null if the value of the input handler is null. |
For details, refer to Logic specifications (Document Mapper/Variable Mapper).
Function details
Regular expression pattern
The available regular expression patterns conform to java.util.regex.Pattern.
For more details on Pattern, refer to "Java(TM) Platform, Standard Edition 8 API Specification" (http://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html).
Logic sample
Mapping definition
Logic settings and processing result
This logic returns "true" if the input data is either "Tokyo" or "Osaka". If not, it returns "false".
Property settings
|
Property |
Setting |
|---|---|
|
Regular expression pattern |
Tokyo|Osaka |
Input data
|
Tokyo |
|
Aichi |
|
Osaka |
Output data
|
true |
|
false |
|
true |
For a list of logics, refer to Mapper Logic Guide.