ABAP Regex Tester
ABAPNewTest regular expressions in ABAP flavor using FIND/REPLACE with REGEX syntax. Preview matches, test PCRE patterns, and generate ready-to-use ABAP code.
Highlighted Matches2 matches
Contact us at support@saptools.dev or admin@example.com
Match List
support@saptools.devadmin@example.comFIND Statement
FIND ALL OCCURRENCES OF REGEX '[a-zA-Z0-9._%+\-]+@[a-zA-Z0-9.\-]+\.[a-zA-Z]{2,}'
IN lv_text
RESULTS DATA(lt_results).
IF sy-subrc = 0.
" Matches found: process lt_results
ENDIF.REPLACE Statement
REPLACE ALL OCCURRENCES OF REGEX '[a-zA-Z0-9._%+\-]+@[a-zA-Z0-9.\-]+\.[a-zA-Z]{2,}'
IN lv_text
WITH '<replacement>'.Advertisement
Frequently Asked Questions
Does ABAP use standard PCRE regex syntax?
ABAP supports PCRE (Perl-Compatible Regular Expressions) in FIND/REPLACE statements and in the CL_ABAP_REGEX class. Most standard PCRE syntax works, but some features like lookahead/lookbehind may behave differently. Test your patterns here before using them in production.
How do I use regex in ABAP code?
Use FIND REGEX pattern IN string. For replacements: REPLACE ALL OCCURRENCES OF REGEX pattern IN string WITH replacement. For programmatic use, CL_ABAP_REGEX and CL_ABAP_MATCHER provide an object-oriented interface with named groups and submatches.
What is the difference between FIND REGEX and FIND with wildcard?
FIND with wildcard (* and ?) uses simple glob-style matching (limited). FIND REGEX uses the full PCRE engine, supporting character classes, quantifiers, groups, and anchors. Always use REGEX for complex pattern matching.
Advertisement