Operator to check if the string matches the template

LIKE operator allows you to compare the left-side expression value with the right-side template string. Expression value must be of the String type. If the expression value matches the template, the operator returns TRUE; else - FALSE.

The following characters in template string are for system use only and have non-string character meaning:

  • % (per cent): A sequence of any number of arbitrary characters
  • _ (underscore): A single arbitrary character
  • […] (one or more characters in square brackets): Any single character listed in the square brackets
    An enumeration can include ranges (for example, a-z) that signify arbitrary character included in the range (including range ends).
  • [^…] (negation mark in square brackets, followed by one or more characters): any single character except for those listed after the negation character

Any other character represents itself only and does not have any additional use.

If you need to specify one of the characters described above as itself, precede it with <Escape Character>. The <Escape Character> (any suitable character) is defined in the same operator after the ESCAPE keyword.

For example, the following template: "%ABC[0-9][abcd]\_abc%" ESCAPE "\" means substring that consists of the following character sequence:
the letter A; the letter B; the letter C; a digit; one of the letters a, b, c or d; an underscore; the letter a; the letter b; the letter c.

And this sequence can be preceded by custom set of characters.

See also: Logical Expressions

1C:Enterprise Developer's Community