From 30b2b5f716a658d71cddcedbf1c8c861847e91cf Mon Sep 17 00:00:00 2001 From: Bingran Hu Date: Fri, 19 Jul 2024 16:23:19 -0400 Subject: [PATCH] update doc --- docs/src/dev-guide/components-core/regex-utils.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/src/dev-guide/components-core/regex-utils.md b/docs/src/dev-guide/components-core/regex-utils.md index a7ec16774..c154a3c8c 100644 --- a/docs/src/dev-guide/components-core/regex-utils.md +++ b/docs/src/dev-guide/components-core/regex-utils.md @@ -62,6 +62,19 @@ For a detailed description on the options order and usage, see the * Turn `.*` into `*` * Turn `.+` into `?*` * E.g. `abc.*def.ghi.+` will get translated to `abc*def?ghi?*` +* Metacharacter escape sequences + * Append the escaped metacharacters literally to the wildcard output string. + * The list of characters that require escaping is `[\/^$.|?*+(){}`. + * The list of characters that are optional to escape is `],<>-_=!`. Escaping them will not have + any effect (the escape backslash is ignored). This list may be expanded in the future. + * E.g. `a\[\+b\-\_c-_d` will get translated to `a[+b-_c-_d` + * For metacharacters shared by both syntaxes, keep the escape backslashes. + * The list of characters that fall into this category is `*?\`. All wildcard metacharacters are + also regex metacharacters. + * E.g. `a\*b\?c\\d` will get translated to `a\*b\?c\\d` (no change) + * Escape sequences with alphanumeric characters are disallowed. + * E.g. Special utility escape sequences `\Q`, `\E`, `\A` etc. and back references `\1` `\2` etc. + cannot be translated. ### Custom configuration