The following program section can be used for testing regular expressions:
The data object match contains the value "X" if the regular expression transferred to pattern matches the character string transferred to text.
The following program has the same functions, but works using explicit generation of an object of the class CL_ABAP_REGEX. If the same regular expression is used several times for different texts, this form is better for performance than the shorter version above.