More details on Regular Expressions processing
Regular expression processing in ASTER, as implemented in Int4 Suite, is based on the POSIX-compatible regular expression solutions as provided by the ABAP platform in versions 7.40 and beyond. Due to compatibility reasons, support of the newer PCRE syntax is not available.
There are various manuals available for regular expressions. For complete reference of the actual solution, read more in SAP Help documentation pages: https://help.sap.com/doc/abapdocu_740_index_htm/7.40/en-US/abenregex_search.htm
Although POSIX implementation does not support non-greedy behaviour of +
and *
operators, ASTER attempts to overcome this limitation at the cost of some additional processing. One can request non-greedy behaviour by specifying the U
option parameter.
Please note that this un-greedy solution is not equal to how PCRE and other regular expression processing engines implement non-greedy operators and might work differently. The results obtained by specifying the U
option may be different from their PCRE *?
or +?
counterparts.
Worth noticing that specific results in the un-greedy mode are likely to appear when regular expressions contain boundary-like matching (e.g. word boundary \b
or end-of-line boundary $
).
Result table
Regular expressions provide significant amounts of data after execution.
Data element | Match | Match Data | Submatch | Submatch Data |
---|---|---|---|---|
Reference in code |
|
|
|
|
Example |
|
|
|
|
Match and submatch data lists contain the following information
Index | Meaning | Example |
---|---|---|
| Offset of match or submatch from the start of string, zero-based. |
CODE
|
| Length of the match or submatch |
CODE
|
| The actual match string or subgroup string |
CODE
|