SAP MATCHES FUNCTIONS

Get Example source ABAP code based on a different SAP table
  

Warning: Undefined variable $prev in /customers/b/9/9/trailsap.com/httpd.www/sap-help/index.php on line 54
ARTICLE
• matches ABAP_FUNCTION

rel_exp - matches, Predicate Function

Syntax
... matches( val = text regex = regex [ case = case]
[off = off] [len = len] ) ...

Effect
The predicate function matches compares a search range of the argument text, defined using off and len, with the regular expression specified in regex. A corresponding logical value is returned. The return value is true when the whole search range matches the regular expression. The comparison is case-sensitive by default, but this can be overridden using the parameter case .

Note
The match function match can be used to return a subfield that matches a regular expression.

Example
See Predicate Function, matches



Runtime Exceptions

Catchable Exceptions
CX_SY_RANGE_OUT_OF_BOUNDS
Reason for error:
Illegal offset or length specification in the off and len.
Runtime error:
STRING_OFFSET_TOO_LARGE

CX_SY_REGEX_TOO_COMPLEX
Reason for error:
More information: Exceptions in Regular Expressions.
Runtime error:
REGEX_TOO_COMPLEX

CX_SY_STRG_PAR_VAL
Reason for error:
Regular expression in regex is empty.
Runtime error:
STRG_ILLEGAL_PAR