Get Example source ABAP code based on a different SAP table
ARTICLE
Predicate Function, matches The example demonstrates the predicate function matches.
ABAP_SOURCE_CODE ABAP_EXEC
ABAP_DESCRIPTION The program checks the formal correctness of an e-mail address that has been entered by comparing it with regular expressions. Whilst the first regular expression checks standard e-mail adresses without special characters, the second regular expression performs a more lenient syntax check according to RFC 822. Even the second check, which uses a relatively simple regular expression for the example, does not always work for all e-mail addresses which were possible according to RFC 822. The DEMO_VALIDATE_RFC_822_ADDRESS program uses a regular expression taken from the Internet, which should actually recognize all e-mail addresses allowed by RFC 822. The regular expression there was originally written for perl and no longer consists of more than 6000 characters. The program therefore serves as an example of how not to use regular expressions in ABAP.