Matches
- Last Updated: March 24, 2022
- 1 minute read
- Corticon
- Version 6.3
- Documentation
SYNTAX
<String>.matches(regularExpression:String)DESCRIPTION
Returns true if the regular expression matches the String.USAGE RESTRICTIONS
The Operators row of the table in Summary Table of Vocabulary Usage Restriction applies. No special exceptions.
This sample Rulesheet uses matches in non-conditional actions:Action A: Determine whether a String is a valid
identifier - A String must contain an item identification with the following pattern:
- Characters 1-5: alphabetic.
- Characters 6-10: numeric.
- Character 11: alphabetic.
Action B: Check whether an email address is valid - An email address must have alphanumeric characters and certain special characters before and after an @ and a dot.
SAMPLE RULETEST
A sample Ruletest provides various valid and invalid Strings that are evaluated by the two regular expression examples.