You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/user/ppl/cmd/rex.rst
+16-16Lines changed: 16 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,13 +20,13 @@ rex [mode=<mode>] field=<field> <pattern> [max_match=<int>] [offset_field=<strin
20
20
* field: mandatory. The field must be a string field to extract data from.
21
21
* pattern: mandatory string. The regular expression pattern with named capture groups used to extract new fields. Pattern must contain at least one named capture group using ``(?<name>pattern)`` syntax.
22
22
* mode: optional. Either ``extract`` or ``sed``. **Default:** extract
23
-
* **extract mode** (default): Creates new fields from regular expression named capture groups. This is the standard field extraction behavior.
24
-
* **sed mode**: Performs text substitution on the field using sed-style patterns:
25
-
* ``s/pattern/replacement/`` - Replace first occurrence
26
-
* ``s/pattern/replacement/g`` - Replace all occurrences (global)
27
-
* ``s/pattern/replacement/n`` - Replace only the nth occurrence (where n is a number)
* Backreferences: ``\1``, ``\2``, etc. reference captured groups in replacement
30
30
31
31
* max_match: optional integer (default=1). Maximum number of matches to extract. If greater than 1, extracted fields become arrays. The value 0 means unlimited matches, but is automatically capped to the configured limit (default: 10, configurable via ``plugins.ppl.rex.max_match.limit``).
32
32
* offset_field: optional string. Field name to store the character offset positions of matches. Only available in extract mode.
@@ -217,17 +217,17 @@ Limitations
217
217
===========
218
218
**Named Capture Group Naming:**
219
219
220
-
- Group names must start with a letter and contain only letters and digits
221
-
- For detailed Java regex pattern syntax and usage, refer to the `official Java Pattern documentation <https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html>`_
220
+
* Group names must start with a letter and contain only letters and digits
221
+
* For detailed Java regex pattern syntax and usage, refer to the `official Java Pattern documentation <https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html>`_
222
222
223
223
**Pattern Requirements:**
224
224
225
-
- Pattern must contain at least one named capture group
226
-
- Regular capture groups ``(...)`` without names are not allowed
225
+
* Pattern must contain at least one named capture group
226
+
* Regular capture groups ``(...)`` without names are not allowed
227
227
228
228
**Max Match Limit:**
229
-
230
-
- The ``max_match`` parameter is subject to a configurable system limit to prevent memory exhaustion
231
-
- When ``max_match=0`` (unlimited) is specified, it is automatically capped at the configured limit (default: 10)
232
-
- User-specified values exceeding the configured limit will result in an error
233
-
- Users can adjust the limit via the ``plugins.ppl.rex.max_match.limit`` cluster setting. Setting this limit to a large value is not recommended as it can lead to excessive memory consumption, especially with patterns that match empty strings (e.g., ``\d*``, ``\w*``)
229
+
230
+
* The ``max_match`` parameter is subject to a configurable system limit to prevent memory exhaustion
231
+
* When ``max_match=0`` (unlimited) is specified, it is automatically capped at the configured limit (default: 10)
232
+
* User-specified values exceeding the configured limit will result in an error
233
+
* Users can adjust the limit via the ``plugins.ppl.rex.max_match.limit`` cluster setting. Setting this limit to a large value is not recommended as it can lead to excessive memory consumption, especially with patterns that match empty strings (e.g., ``\d*``, ``\w*``)
0 commit comments