Skip to content
QiTASC.com / intaQt Verification / intaQt Verification Rules /
Matches and Not Matches Rules
/ .. / .. /
Matches and Not Matches Rules










Matches and Not Matches Rules

These rules verify that the ticket property's value matches or does not match the given regex pattern.

Matches

Verifies that the ticket's property matches the given regex pattern.

Syntax

1
2
check <property String> matches <regex String>;
check <property String> matches <regex String> if present;

Parameters

  • property - The property being checked.

  • regex - The expected regex pattern, which must be a valid regular expression.

Example

1
2
check "RECORD_LENGTH" matches "\\d+";
check "RECORD_LENGTH" matches "\\d+" if present;
The examples above verifies that the ticket property "RECORD_LENGTH" has a value that consists of at least one digit. Note that the \ must be escaped with another \.

Additional Example

Property Value Rule Parameter Check Result
"Total cost is 65 Euro" "^.*cost is \\\d+ Euro$" OK

Not Matches

Verifies that the ticket property's value does not match the given regex pattern.

Example

1
2
check <property String> does not match <regex String>;
check <property String> does not match <regex String> if present;
Parameters

  • property - The property being checked.

  • regex - The expected regex pattern, which must be a valid regular expression.

Example

1
2
check "RECORD_LENGTH" does not match "\\d+";
check "RECORD_LENGTH" does not match "\\d+" if present;
The examples above verifies that the ticket property "RECORD_LENGTH" has a value that does not consist of digits.

Additional Examples

Property Value Rule Parameter Check Result
"Total cost is 65 Euro" "^.*cost is \\\d+ Euro$" FAIL