mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
19 lines
702 B
HTML
19 lines
702 B
HTML
<html>
|
|
<body>
|
|
Reports anonymous capturing groups and numeric back references in a RegExp.
|
|
These are only reported when the RegExp dialect supports named group and named group references.
|
|
Named groups and named back references improve code readability and are recommended to use instead.
|
|
When a capture is not needed, matching can be more performant and use less memory by using a non-capturing group,
|
|
i.e. <code>(?:xxx)</code> instead of <code>(xxx)</code>.
|
|
<p><b>Example:</b></p>
|
|
<pre><code>
|
|
(\d\d\d\d)\1
|
|
</code></pre>
|
|
<p>A better regex pattern could look like this:</p>
|
|
<pre><code>
|
|
(?<quad>\d\d\d\d)\k<quad>
|
|
</code></pre>
|
|
<!-- tooltip end -->
|
|
<p><small>New in 2017.2</small>
|
|
</body>
|
|
</html> |