PCRE2TEST(1) General Commands Manual PCRE2TEST(1) (NAME) pcre2test - (Perl-compatible regular expressions). (SYNOPSIS) pcre2test [options] [input file [output file]] pcre2test PCRE2 . pcre2pattern . PCRE2 pcre2api . pcre2test (subject strings) . . . (Modifiers) PCRE2 . PCRE2 . . PCRE2 (PCRE2's 8-BIT, 16-BIT AND 32-BIT LIBRARIES) PCRE2 (code units) . . pcre2test . . . . pcre2_compile(). _8 _16 _32 . (INPUT ENCODING) pcre2test fgets() C libreadline libedit. Windows ( 1A) . C (binary zeros) fgets() . . (backslash escapes) . . (Input for the 16-bit and 32-bit libraries) (character code points) . . utf ( " " ) UTF-8 UTF-16 UTF-32 . UTF (wide characters) utf8_input . utf . (RFC 2279) UTF-8 0x7fffffff . ( 0xffff ). UTF-8 ( ) 0x7fffffff . UTF utf8_input 0xff ( UTF-8 ) 0x80000000 . . (COMMAND LINE OPTIONS) -8 ( ). . -16 . . . -32 . . . -ac auto_callout (automatic callouts) . -AC -ac callout_extra . -b fullbincode . -C PCRE2 . . -C -LM . -C option (build-time option) . RunTest . : linksize ( ) newline : CR, LF, CRLF, ANYCRLF, ANY NUL bsr \R : ANYCRLF ANY true false : backslash-C \C ( ) ebcdic EBCDIC ebcdic-io PCRE2 EBCDIC pcre2test EBCDIC ASCII ebcdic-nl25 PCRE2 EBCDIC NL (= LF) 0x25 ( 0x15 ) jit JIT (just-in-time) pcre2-16 pcre2-32 pcre2-8 unicode (Unicode) JIT . "jitusable" : 0 JIT 1 JIT 2 JIT 3 pcre2_jit_compile() . --colo[u]r[=] auto . always ( ) ANSI never . auto NO_COLOR . -d debug -d -b -i . -dfa dfa pcre2_match() pcre2_dfa_match() . -E " " ( "gcc -E"). "#if ... #endif" . -error number[,number,...] pcre2_get_error_message() . . PCRE2 . -help . -i info . -jit jit JIT . -jitfast jitfast JIT " " (fast path) JIT . -jitverify jitverify JIT JIT . -LM : . . -C -Lx . -LP : (Unicode properties) . . -C -Lx . -LS /: (Unicode scripts) . . -C -Lx . -malloc malloc() malloc malloc(). -pattern modifier-list . -q pcre2test . -S size (run-time stack) size ( 1024*1024 ) . -subject modifier-list . -t . JIT JIT . -t ( ) . "-t 1000" . . -tm -t . -T -TM -t -tm . -unittest API PCRE2 . -version PCRE2 . (DESCRIPTION) pcre2test . "-" (stdin) . pcre2test (stdout) . stdin stdout . pcre2test libreadline libedit (link) . readline() . (history) . -help readline() . . . # . perltest.sh PCRE2 PCRE2 Perl . perltest.sh . #perltest . pcre2test (prompt) "re>" "data>" . # "re>" . . \n ( \r \r\n ) . . (replication) . . (COMMAND LINES) # . (comment) . : #forbid_utf PCRE2_NEVER_UTF PCRE2_NEVER_UCP PCRE2_UTF PCRE2_UCP (*UTF) (*UCP) . \P \p \X PCRE2_UTF . (trigger guard) UTF . PCRE2_NEVER_UTF PCRE2_NEVER_UCP #pattern #forbid_utf . #load " " . #loadtables tables=3 . pcre2_dftables -b . #newline_default [] PCRE2 . / . . linefeed . PCRE2 CR CRLF . #newline_default (newline) . CR LF CRLF ANYCRLF ANY NUL ( ) : #newline_default LF Any anyCRLF . POSIX API newline (LF ) newline . . . POSIX API . posix posix_nosub #newline_default API . #pattern . . #perltest perltest.sh Perl PCRE2 . pcre2test perltest.sh . '/' (delimiter) . #pattern #subject "mark" . #perltest #forbid_utf #newline_default pcre2test . . #perltest . perltest.sh . #pop [] #popcopy [] " " . #save " " . #subject (subject) . . #if CONDITION ... #endif CONDITION (true) . CONDITION (false) "#if" "#endif" . CONDITION "-C" pcre2test . CONDITION "!" . (MODIFIER SYNTAX) (subject) . . . . "anchored" "offset=12". . . "i" "caseless". Perl (" /i"). . . : /abc/ig,newline=cr,jit=3 (/i /g) . Perl . (PATTERN SYNTAX) ( ): / ! " ' ` - = _ : ; , % & @ ~ (delimiter) . . (literal) : /abc\/def/ - . \Q...\E . : /abc/\ . : /abc\/ "abc/" pcre2test . ( ). (SUBJECT LINE SYNTAX) (subject) pcre2_match() pcre2_dfa_match() pcre2_jit_match() subject_literal . : \a (BEL, \x07) \b / Backspace (\x08) \e (\x27) \f / Form feed (\x0c) \n (\x0a) \N{U+hh...} ( ) \r / Carriage return (\x0d) \t (\x09) \v (\x0b) \ddd ( ) \o{dd...} ( ) UTF \xhh ( ) \x{hh...} ( ) UTF \N{U+hh...} \x{hh...} utf . \N{U+hh...} . UTF-8 \xhh ( \ddd) UTF-8 . \x{hh...} UTF-8 UTF-8 . \N{U+hh...} . UTF-8 \x{hh} . UTF-16 \x{hhhh} . UTF-16 . UTF-32 \x{...} . UTF-32 . : \[]{} . : \[abc]{4} "abcabcabcabc" . . \x5D . . : abc\=notbol,notempty \= . : \= This is a comment. abc\= This is an invalid modifier list. - . . ( ) . . subject_literal (literal) . #subject . (PATTERN MODIFIERS) . #pattern . #pattern . (Setting compilation options) pcre2_compile() . PCRE2_EXTRA (compile context) . . /x : x Perl PCRE2_EXTENDED PCRE2_EXTENDED_MORE . x PCRE2_EXTENDED pcre2_compile() . pcre2api . allow_empty_class PCRE2_ALLOW_EMPTY_CLASS allow_lookaround_bsk PCRE2_EXTRA_ALLOW_LOOKAROUND_BSK allow_surrogate_escapes PCRE2_EXTRA_ALLOW_SURROGATE_ESCAPES alt_bsux PCRE2_ALT_BSUX alt_circumflex PCRE2_ALT_CIRCUMFLEX alt_extended_class PCRE2_ALT_EXTENDED_CLASS alt_verbnames PCRE2_ALT_VERBNAMES anchored PCRE2_ANCHORED /a ascii_all ASCII ascii_bsd PCRE2_EXTRA_ASCII_BSD ascii_bss PCRE2_EXTRA_ASCII_BSS ascii_bsw PCRE2_EXTRA_ASCII_BSW ascii_digit PCRE2_EXTRA_ASCII_DIGIT ascii_posix PCRE2_EXTRA_ASCII_POSIX auto_callout PCRE2_AUTO_CALLOUT bad_escape_is_literal PCRE2_EXTRA_BAD_ESCAPE_IS_LITERAL /i caseless PCRE2_CASELESS /r caseless_restrict PCRE2_EXTRA_CASELESS_RESTRICT dollar_endonly PCRE2_DOLLAR_ENDONLY /s dotall PCRE2_DOTALL dupnames PCRE2_DUPNAMES endanchored PCRE2_ENDANCHORED escaped_cr_is_lf PCRE2_EXTRA_ESCAPED_CR_IS_LF /x extended PCRE2_EXTENDED /xx extended_more PCRE2_EXTENDED_MORE extra_alt_bsux PCRE2_EXTRA_ALT_BSUX firstline PCRE2_FIRSTLINE literal PCRE2_LITERAL match_line PCRE2_EXTRA_MATCH_LINE match_invalid_utf PCRE2_MATCH_INVALID_UTF match_unset_backref PCRE2_MATCH_UNSET_BACKREF match_word PCRE2_EXTRA_MATCH_WORD /m multiline PCRE2_MULTILINE never_backslash_c PCRE2_NEVER_BACKSLASH_C never_callout PCRE2_EXTRA_NEVER_CALLOUT never_ucp PCRE2_NEVER_UCP never_utf PCRE2_NEVER_UTF /n no_auto_capture PCRE2_NO_AUTO_CAPTURE no_auto_possess PCRE2_NO_AUTO_POSSESS no_bs0 PCRE2_EXTRA_NO_BS0 no_dotstar_anchor PCRE2_NO_DOTSTAR_ANCHOR no_start_optimize PCRE2_NO_START_OPTIMIZE no_utf_check PCRE2_NO_UTF_CHECK python_octal PCRE2_EXTRA_PYTHON_OCTAL turkish_casing PCRE2_EXTRA_TURKISH_CASING ucp PCRE2_UCP ungreedy PCRE2_UNGREEDY use_offset_limit PCRE2_USE_OFFSET_LIMIT utf PCRE2_UTF utf PCRE2_UTF \x{hh...} . 0x100 . utf UTF-16 UTF-32 . pcre2_set_optimize() : optimization_full optimization_none auto_possess auto_possess_off dotstar_anchor .* dotstar_anchor_off .* start_optimize start_optimize_off pcre2_set_optimize . (Setting compilation controls) . . /B bincode bsr=[anycrlf|unicode] \R callout_info (callout) convert= convert_glob_escape=c glob convert_glob_separator=c glob convert_length debug info,fullbincode expand framesize fullbincode /I info hex jit[=] JIT jitfast JIT jitverify JIT locale= (locale) max_pattern_compiled ) _length= ) ( ) max_pattern_length= ( ) max_varlookbehind= memory newline= null_context NULL null_pattern NULL parens_nest_limit= posix POSIX API posix_nosub POSIX API REG_NOSUB push pushcopy pushtablescopy stackguard= stackguard subject_literal tables=[0|1|2|3] use_length utf8_input UTF-8 . (Newline) \R bsr \R . "anycrlf" \R CR LF CRLF . "unicode" \R . PCRE2 Unicode . newline (subject) . CR LF CRLF ANYCRLF ANY NUL ( ). debug info,fullbincode . bincode . (internal link sizes) (code unit widths) . bincode . fullbincode . . info ( ). pcre2_pattern_info() . : re> /(?i)(^a|^b)/m,info Capture group count = 1 Compile options: multiline Overall options: caseless multiline First code unit at start or follows newline Subject length lower bound = 1 re> /(?i)abc/info Capture group count = 0 Compile options: Overall options: caseless First code unit = 'a' (caseless) Last code unit = 'c' (caseless) Subject length lower bound = 3 <> <> . <> . <> <> . <> . . . no_start_optimize . framesize ( ) pcre2_match() (backtracking) . . heapframes_size . callout_info . . . NULL pcre2test pcre2_compile() . null_context NULL . pcre2_compile() ( ). NULL null_pattern pcre2_compile() NULL . PCRE2_ZERO_TERMINATED use_length . . hex . . . : /ab 32 59/hex (literal) . : /ab "literal" 32/hex . . hex expand . (zero-terminated) . use_length . hex ( use_length ) . hex use_length POSIX ( << POSIX>> ) REG_PEND . (Variable lookbehind assertions) ( ) . . max_varlookbehind pcre2_set_max_varlookbehind() . . utf UTF-8 UTF-16 UTF-32 . UTF utf8_input . utf . UTF-8 . << >> . . . expand \[]{} pcre2_compile() . \[AB]{6000} "ABAB..." . . "\[" "]{" "}" . . expand hex . . \[AB]{6000,6000} . info . (JIT compilation) Just-in-time (JIT) . pcre2jit . JIT . JIT . PCRE2_PARTIAL_HARD PCRE2_PARTIAL_SOFT . partial << >> . JIT jit . JIT : 1 compile JIT code for non-partial matching 2 compile JIT code for soft partial matching 4 compile JIT code for hard partial matching jit : 0 disable JIT 1 normal matching only 2 soft partial matching only 3 normal and soft partial matching 4 hard partial matching only 6 soft and hard partial matching only 7 all three modes . <> ( ) pcre2_match() PCRE2_PARTIAL_SOFT PCRE2_PARTIAL_HARD . . JIT ( jit=2) partial JIT . JIT JIT . pcre2jit . jitstack JIT . jitfast << >> JIT pcre2_jit_match() pcre2_match() JIT . jitfast jit jit=7 . jitverify JIT . jitverify jit jit=7 . JIT jitverify JIT "(JIT)" . (Locale) locale : /pattern/locale=fr_FR pcre2_maketables() pcre2_compile() . . locale #pattern . . memory ( ) . pcre2_code . JIT JIT . : re> /a(b)c/jit,memory Memory allocation (code space): 21 Memory allocation (JIT code): 1910 parens_nest_limit . . PCRE2 pcre2test . max_pattern_length ( ) pcre2_compile() . . PCRE2_SIZE ( ). max_pattern_compiled_length ( ) . . PCRE2_SIZE ( ). POSIX posix posix_nosub pcre2test PCRE2 POSIX . posix_nosub REG_NOSUB POSIX regcomp() . POSIX . POSIX pcre2posix . regcomp() : caseless REG_ICASE multiline REG_NEWLINE dotall REG_DOTALL ) ungreedy REG_UNGREEDY ) These options are not part of ucp REG_UCP ) the POSIX standard utf REG_UTF8 ) regerror_buffsize regerror() . : /abc/posix,regerror_buffsize=20 regerror() . . aftertext allaftertext . ( ) . regcomp() use_length hex REG_PEND . (Testing the stack guard feature) stackguard pcre2_set_compile_recursion_guard() ( pcre2api ). pcre2_set_compile_recursion_guard() (callback) pcre2_compile() . . (Using alternative character tables) tables 0 1 2 3 . pcre2_compile() . PCRE2 . : 0 1 ASCII pcre2_chartables.c.dist 2 ISO 8859 3 #loadtables 2 128 . 3 #loadtables . (locale) () . (Setting certain match controls) << >> . . . aftertext allaftertext allcaptures allvector ovector allusedtext altglobal /g global heapframes_size heapframes jitstack= JIT mark mark null_substitute_match_data NULL replace= startchar substitute_callout substitute_case_callout substitute_extended PCRE2_SUBSTITUTE_EXTENDED substitute_literal PCRE2_SUBSTITUTE_LITERAL substitute_matched PCRE2_SUBSTITUTE_MATCHED substitute_overflow_length PCRE2_SUBSTITUTE_OVERFLOW_LENGTH substitute_replacement_only PCRE2_SUBSTITUTE_REPLACEMENT_ONLY substitute_skip= substitute_stop= substitute_unknown_unset PCRE2_SUBSTITUTE_UNKNOWN_UNSET substitute_unset_empty PCRE2_SUBSTITUTE_UNSET_EMPTY #pattern . #subject . (Specifying literal subject lines) subject_literal (literal) . #subject . (Saving a compiled pattern) push (push) pcre2test ( ) . << >> . push pushcopy . pcre2_code_copy() . push pushcopy global . ( ) replace . jitverify . (Testing foreign pattern conversion) PCRE2 convert . pcre2_pattern_convert() : glob PCRE2_CONVERT_GLOB glob_no_starstar PCRE2_CONVERT_GLOB_NO_STARSTAR glob_no_wild_separator PCRE2_CONVERT_GLOB_NO_WILD_SEPARATOR posix_basic PCRE2_CONVERT_POSIX_BASIC posix_extended PCRE2_CONVERT_POSIX_EXTENDED unset (Unset all options) "unset" #pattern . pcre2_pattern_convert() . pcre2_compile() . utf no_utf_check PCRE2_CONVERT_UTF PCRE2_CONVERT_NO_UTF_CHECK pcre2_pattern_convert() . . convert_length pcre2test . . convert_glob_escape convert_glob_separator glob . (SUBJECT MODIFIERS) #subject . (Setting match options) pcre2_match() pcre2_dfa_match() . pcre2api . anchored PCRE2_ANCHORED copy_matched_subject PCRE2_COPY_MATCHED_SUBJECT endanchored PCRE2_ENDANCHORED dfa_restart PCRE2_DFA_RESTART dfa_shortest PCRE2_DFA_SHORTEST disable_recurseloop_check PCRE2_DISABLE_RECURSELOOP_CHECK no_jit PCRE2_NO_JIT no_utf_check PCRE2_NO_UTF_CHECK notbol PCRE2_NOTBOL notempty PCRE2_NOTEMPTY notempty_atstart PCRE2_NOTEMPTY_ATSTART noteol PCRE2_NOTEOL partial_hard (or ph) PCRE2_PARTIAL_HARD partial_soft (or ps) PCRE2_PARTIAL_SOFT . posix posix_nosub POSIX wrapper notbol notempty noteol REG_NOTBOL REG_NOTEMPTY REG_NOTEOL regexec() . . POSIX wrapper . POSIX ( ). posix_startend=[:] REG_STARTEND regexec() . . REG_STARTEND pcre2posix . ( \x{00} pcre2test ) posix_startend . (Setting match controls) . ( ) . aftertext allaftertext allcaptures allusedtext ( non-JIT) allvector ovector altglobal callout_capture callout_data= callout_error=[:] callout_extra callout_fail=[:] callout_no_where callout_none copy= depth_limit= dfa pcre2_dfa_match() find_limits (heap) find_limits_noheap get= getall /g global heapframes_size heapframes heap_limit= () jitstack= JIT mark mark match_limit= memory null_context (context) NULL null_replacement NULL null_subject NULL null_substitute_match_data NULL offset= offset_limit= ovector= (output vector) recursion_limit= depth_limit replace= startchar startchar startoffset= offset= substitute_callout substitute_case_callout substitute_extended PCRE2_SUBSTITUTE_EXTENDED substitute_literal PCRE2_SUBSTITUTE_LITERAL substitute_matched PCRE2_SUBSTITUTE_MATCHED substitute_overflow_length PCRE2_SUBSTITUTE_OVERFLOW_LENGTH substitute_replacement_only PCRE2_SUBSTITUTE_REPLACEMENT_ONLY substitute_skip= n substitute_stop= n substitute_subject= substitute_unknown_unset PCRE2_SUBSTITUTE_UNKNOWN_UNSET substitute_unset_empty PCRE2_SUBSTITUTE_UNSET_EMPTY zero_terminate (zero- terminated) . POSIX wrapper aftertext allaftertext ovector . ( ) . (Showing more text) aftertext pcre2test . . allaftertext . (+) . allusedtext . JIT JIT ( ). lookbehind lookahead \K . '<' '>' . : re> /(?<=pqr)abc(?=xyz)/ data> 123pqrabcxyz456\=allusedtext 0: pqrabcxyz <<< >>> data> 123pqrabcxy\=ph,allusedtext Partial match: pqrabcxy <<< ( ) "abc" "pqr" "xyz" ( assertion) . . startchar . \K . (^) . : re> /abc\Kxyz/ data> abcxyz\=startchar 0: abcxyz ^^^ allusedtext startchar JIT . . (Showing the value of all capture groups) allcaptures . ( pcre2_match()). "" . DFA ( ) replace . ovector (Showing the entire ovector, for all outcomes) allvector ovector . allcaptures DFA . DFA ovector . ovector "" . . ovector . . DFA ovector . (Testing pattern callouts) pcre2test (callout) callout_none . callout_ . <<>> (Callouts) . pcre2_substitute() << >> . (subject) global altglobal . . global altglobal start_offset pcre2_match() pcre2_dfa_match() ( Perl ) . ( \b \B) . PCRE2_NOTEMPTY_ATSTART . Perl /g split() . copy get pcre2_substring_copy_xxx() pcre2_substring_get_xxx() . (capture group) : abcd\=copy=1,copy=3,get=G1 #subject copy / get (unset) . getall pcre2_substring_list_get() . C G L . . ( ) . (substitution) replace pcre2_substitute() ( pcre2_match() PCRE2_SUBSTITUTE_MATCHED) . . . . . pcre2test (escape sequences) . UTF UTF-8 . UTF (code unit width) . UTF-8 . UTF-8 . ( ) pcre2_substitute() : global PCRE2_SUBSTITUTE_GLOBAL substitute_extended PCRE2_SUBSTITUTE_EXTENDED substitute_literal PCRE2_SUBSTITUTE_LITERAL substitute_matched PCRE2_SUBSTITUTE_MATCHED substitute_overflow_length PCRE2_SUBSTITUTE_OVERFLOW_LENGTH substitute_replacement_only PCRE2_SUBSTITUTE_REPLACEMENT_ONLY substitute_unknown_unset PCRE2_SUBSTITUTE_UNKNOWN_UNSET substitute_unset_empty PCRE2_SUBSTITUTE_UNSET_EMPTY pcre2api . . . : /abc/replace=xxx =abc=abc= 1: =xxx=abc= =abc=abc=\=global 2: =xxx=xxx= ( ) . pcre2_substitute() . : /abc/ 123abc123\=replace=[10]XYZ 1: 123XYZ123 123abc123\=replace=[9]XYZ Failed: error -48: no more memory pcre2_substitute() PCRE2_ERROR_NOMEMORY . PCRE2_SUBSTITUTE_OVERFLOW_LENGTH ( substitute_overflow_length) pcre2_substitute() ( ) . pcre2test ( ) . : /abc/substitute_overflow_length 123abc123\=replace=[9]XYZ Failed: error -48: no more memory: 10 code units are needed POSIX DFA . ("bad option value") pcre2_substitute() . substitute_subject PCRE2 API pcre2_match() pcre2_substitute() PCRE2_SUBSTITUTE_MATCHED . substitute_callout . null_context (match context) . ( ) . : /abc/g,replace=<$0>,substitute_callout abcdefabcpqr 1(1) Old 0 3 "abc" New 0 5 "" 2(1) Old 6 9 "abc" New 8 13 "" 2: defpqr . ovector ( ). . /g . . substitute_skip +1 substitute_stop -1 . -1 . substitute_callout . : /abc/g,replace=<$0>,substitute_skip=1 abcdefabcpqr 1(1) Old 0 3 "abc" New 0 5 " SKIPPED" 2(1) Old 6 9 "abc" New 6 11 "" 2: abcdefpqr abcdefabcpqr\=substitute_stop=1 1(1) Old 0 3 "abc" New 0 5 " STOPPED" 1: abcdefabcpqr stop . skip stop . substitute_case_callout (case) . . : // (upper/lower/titlecase). (caseless) . JIT jitstack (just-in-time) . JIT . ( ) . 32KiB . . jitstack (override) . heap_limit match_limit depth_limit (match context) . find_limits find_limits_noheap . find_limits pcre2test pcre2_set_heap_limit() pcre2_set_match_limit() pcre2_set_depth_limit() "limit exceeded" . . find_limits_noheap . . JIT . (*LIMIT_MATCH=...) . pcre2_set_match_limit() . DFA depth_limit (backtracking) ( ). DFA depth_limit (lookaround assertions) . DFA match_limit . . DFA match_limit ( ) . heap_limit ( ) . MARK mark (backtracking control verbs) pcre2_match() . mark pcre2test . "MK:" . . memory pcre2test pcre2_match() pcre2_dfa_match() (log) . . JIT . null_context . (heap frame) heapframes_size pcre2_match() JIT . ( ) ( ) . pcre2_match() ( ) . POSIX DFA . JIT JIT . ( ) pcre2test ( ) . offset . . offset_limit (unanchored) . "no match" . . use_offset_limit . ovector #subject . . . POSIX API regexec() NULL . POSIX API pcre2_match_data_create_from_pattern() . ( ovector .) . API . (zero-terminated) zero_terminate . PCRE2_ZERO_TERMINATED . POSIX . pcre2_substitute() . NULL pcre2test pcre2_match() pcre2_dfa_match() pcre2_jit_match() pcre2_substitute() . null_context NULL . ( ). find_limits find_limits_noheap substitute_callout . null_subject null_replacement NULL . pcre2test PCRE2 pcre2_match() . PCRE2 pcre2_dfa_match() . pcre2matching . dfa . . dfa_shortest . . pcre2test (DEFAULT OUTPUT FROM pcre2test) pcre2_match() . pcre2test 0 . PCRE2_ERROR_NOMATCH "No match" PCRE2_ERROR_PARTIAL "Partial match:" . ( (lookbehind) \K \b \B .) pcre2test PCRE2 . UTF . pcre2test . $ pcre2test PCRE2 version 10.22 2016-07-29 re> /^abc(\d+)/ data> abc123 0: abc123 1: 123 data> xyz No match pcre2test allcaptures . . <<>> "" . re> /(a)|(b)/ data> a 0: a 1: a data> b 0: b 1: 2: b 256 UTF \xhh . \x{hh...} . . aftertext 0 "0+" : re> /cat/aftertext data> cataract 0: cat 0+ aract : re> /\Bi(\w\w)/g data> Mississippi 0: iss 1: ss 0: iss 1: ss 0: ipp 1: pp "No match" . ( 4 offset ): re> /xyz/ data> xyz\=offset=4 Error -24 (bad offset value) ( ">" ) . \n ( \r \r\n ) . (OUTPUT FROM THE ALTERNATIVE MATCHING FUNCTION) pcre2_dfa_match() . : re> /(tang|tangerine|tan)/ data> yellow tangerine\=dfa 0: tangerine 1: tang 2: tan "tang" . ( ). PCRE2_ERROR_PARTIAL "Partial match:" . (lookbehind) \b \B . (\K DFA .) . : re> /(tang|tangerine|tan)/g data> yellow tangerine and tangy sultana\=dfa 0: tangerine 1: tang 2: tan 0: tang 1: tan 0: tan . (RESTARTING AFTER A PARTIAL MATCH) PCRE2_ERROR_PARTIAL dfa_restart . : re> /^\d?\d(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\d\d$/ data> 23ja\=ps,dfa Partial match: 23ja data> n05\=dfa,dfa_restart 0: n05 pcre2partial . (CALLOUTS) (callout) pcre2test callout_none . JIT . . (Callouts with numerical arguments) . : --->pqrabcdef 0 ^ ^ \d 0 \d . ( ) (circumflex) . 255 auto_callout . . : re> /\d?[A-E]\*/auto_callout data> E* --->E* +0 ^ \d? +3 ^ [A-E] +8 ^^ \* +10 ^ ^ 0: E* (*MARK) (mark) . : re> /a(*MARK:X)bc/auto_callout data> abc --->abc +0 ^ a +1 ^^ (*MARK:X) +10 ^^ b Latest Mark: X +11 ^ ^ c +12 ^ ^ 0: abc "a" "b" . (backtracking) "" . (Callouts with string arguments) . : re> /^ab(?C'first')cd(?C"second")ef/ data> abcdefg Callout (7): 'first' --->abcdefg ^ ^ c Callout (20): "second" --->abcdefg ^ ^ e 0: abcdef (Callout modifiers) pcre2test ( ) callout_fail ( ). callout_capture . DFA pcre2_dfa_match() . ( ) callout_no_where . pcre2_match() JIT callout_extra pcre2test . "New match attempt" . ( ) (backtrack) "Backtrack" "No other matching paths" . : re> /(a+)b/auto_callout,no_start_optimize,no_auto_possess data> aac\=callout_extra New match attempt --->aac +0 ^ ( +1 ^ a+ +3 ^ ^ ) +4 ^ ^ b Backtrack --->aac +3 ^^ ) +4 ^^ b Backtrack No other matching paths New match attempt --->aac +0 ^ ( +1 ^ a+ +3 ^^ ) +4 ^^ b Backtrack No other matching paths New match attempt --->aac +0 ^ ( +1 ^ a+ Backtrack No other matching paths New match attempt --->aac +0 ^ ( +1 ^ a+ No match . no_start_optimize "no match" "b" . no_auto_possess "a+" "a++" . callout_extra DFA JIT . (Return values from callouts) . callout_fail . 1 0 ( ). (:) 1 . callout_error PCRE2_ERROR_CALLOUT . callout_error . . callout_data . "user data" callout . pcre2test . pcre2test . pcre2callout . (NON-PRINTING CHARACTERS) pcre2test 32-126 . pcre2test (locale) ( locale). isprint() . (SAVING AND RESTORING COMPILED PATTERNS) . JIT . PCRE2 (endianness) PCRE2_SIZE . . . ( 1088 ). pcre2_serialize_ (de-serializing) . pcre2serialize . pcre2test . <<>> PCRE2 .NET . . pcre2test push (push) pcre2test (subject) ( ) . pushcopy . push / pushcopy . posix ( ). jitverify . #save . . #load . #pop . . hex posix posix_nosub push pushcopy . JIT . : /abc/push /xyz/push #save tempfile #load tempfile #pop info xyz #pop jit,bincode abc jitverify #pop jit . #popcopy pushcopy . (SEE ALSO) pcre2(3), pcre2api(3), pcre2callout(3), pcre2jit, pcre2matching(3), pcre2partial(d), pcre2pattern(3), pcre2serialize(3). (AUTHOR) Philip Hazel Retired from University Computing Service Cambridge, England. (REVISION) Last updated: 22 August 2026 Copyright (c) 1997-2024 University of Cambridge. PCRE2 10.48 22 August 2026 PCRE2TEST(1)