| Replacement Reference |
| Characters |
| Matched Text & Backreferences |
| Case Conversion |
| Context |
| Conditionals |
| Feature | Syntax | Description | Example | JGsoft | Python | JavaScript | VBScript | XRegExp | .NET | Java | ICU | RE2 | Perl | PCRE | PCRE2 | PHP | Delphi | R | Ruby | std::regex | Boost | Tcl | POSIX | GNU | Oracle | XML | XPath |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Control verb | or | Fail to match, forcing the engine to backtrack, when reached during the normal matching process. | ab|c matches c in abc | no | no | no | no | no | no | no | no | no | YES | 7.4 | YES | YES | YES | YES | no | no | ECMA 1.60 | no | no | no | no | no | no |
| Control verb | Accept the match so far as the overall match when reached during the normal matching process. | ab|c matches a | no | no | no | no | no | no | no | no | no | YES | 7.4 | YES | YES | YES | YES | no | no | ECMA 1.60 | no | no | no | no | no | no | |
| Control verb | inside a capturing group. | Accept the match so far of each parent capturing group in addition to accepting the overall match. | a(bc)d|e matches ab | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | YES | 8.00 | YES | YES | XE7 | YES | n/a | n/a | ECMA 1.60 | n/a | n/a | n/a | n/a | n/a | n/a |
| Control verb | Accept the match so far of the atomic group and continue matching the remainder of the regex when reached during the normal matching process. | a(?>bc).|d matches abx | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | YES | no | no | no | n/a | n/a | ECMA 1.60 | n/a | n/a | n/a | n/a | n/a | n/a | |||
| Control verb | Commit to failure by stopping the matching process entirely when reached while backtracking. | ab+d+|.{3} fails to match abbbccc | no | no | no | no | no | no | no | no | no | YES | 7.4 | YES | YES | YES | YES | no | no | ECMA 1.60 | no | no | no | no | no | no | |
| Control verb | Skip the match attempt by restarting the matching process at the position of when reached while backtracking. | ab+d+|.{3} matches ccc in abbbccc | no | no | no | no | no | no | no | no | no | YES | 7.4 | YES | YES | YES | YES | no | no | ECMA 1.60 | no | no | no | no | no | no | |
| Control verb argument | and | Skip the match attempt by restarting the matching process at the position where was reached during the normal matching process before was reached while backtracking. | a+b+d+|.{3} matches bbb in aaabbbccc | no | no | no | no | no | no | no | no | no | YES | 8.10 | YES | YES | XE7 | YES | no | no | no | no | no | no | no | no | no |
| Control verb argument | and | Skip the match attempt by restarting the matching process at the position where was reached during the normal matching process before was reached while backtracking. | a+b+d+|.{3} matches bbb in aaabbbccc | no | no | no | no | no | no | no | no | no | YES | 8.10 | YES | YES | XE7 | YES | no | no | no | no | no | no | no | no | no |
| Control verb | Prune all backtracking positions when reached while backtracking, failing the match attempt but allowing the regex to advance one character and restart the matching process. | ab+d+|.{3} matches bbb in abbbccc | no | no | no | no | no | no | no | no | no | YES | 7.4 | YES | YES | YES | YES | no | no | ECMA 1.60 | no | no | no | no | no | no | |
| Control verb | If reached while backtracking then cancel the current alternative and continue with the next alternative. | ab+d+|.{3} matches abb in abbbccc | no | no | no | no | no | no | no | no | no | YES | 7.4 | YES | YES | YES | YES | no | no | no | no | no | no | no | no | no | |
| Control verb | If reached while backtracking then cancel the innermost group that has alternative and continue with the remainder of the regex as if that group failed to match. | a(b+d+|.{2})|a matches a in abbbccc | no | no | no | no | no | no | no | no | no | no | no | no | no | no | no | no | no | ECMA 1.60 | no | no | no | no | no | no | |
| Feature | Syntax | Description | Example | JGsoft | Python | JavaScript | VBScript | XRegExp | .NET | Java | ICU | RE2 | Perl | PCRE | PCRE2 | PHP | Delphi | R | Ruby | std::regex | Boost | Tcl | POSIX | GNU | Oracle | XML | XPath |
| Quick Start | Tutorial | Search & Replace | Tools & Languages | Examples | Reference |
| Introduction | Table of Contents | Quick Reference | Characters | Basic Features | Character Classes | Shorthands | Anchors | Word Boundaries | Quantifiers | Capturing Groups & Backreferences | Named Groups & Backreferences | Special Groups | Unicode Characters and Properties | Unicode Versions | Unicode Categories | Unicode Scripts | Unicode Blocks | Unicode Binary Properties | Unicode Property Sets | Unicode Boundaries | Mode Modifiers | Recursion & Balancing Groups | Backtracking Control Verbs |
| Characters | Matched Text & Backreferences | Case Conversion | Context | Conditionals |
Page URL: https://www.regular-expressions.info/refverb.html
Page last updated: 17 June 2025
Site last updated: 29 October 2025
Copyright © 2003-2025 Jan Goyvaerts. All rights reserved.