Skip to content

Commit eeec40f

Browse files
committed
Update warning to be correct for library update
The warning we have here is not accurate for PCRE2, since it supports more Unicode properties than PCRE. See also <PCRE2Project/pcre2#39> and <https://www.pcre.org/current/doc/html/pcre2pattern.html>.
1 parent 7eac9ce commit eeec40f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/writing-rules/rule-syntax.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ This rule looks for usage of the Python standard library functions `hashlib.md5`
155155
The `pattern-regex` operator searches files for substrings matching the given [PCRE2](https://www.pcre.org/current/doc/html/pcre2pattern.html) pattern. This is useful for migrating existing regular expression code search functionality to Semgrep. Perl-Compatible Regular Expressions (PCRE) is a full-featured regex library that is widely compatible with Perl, but also with the respective regex libraries of Python, JavaScript, Go, Ruby, and Java. Patterns are compiled in multiline mode, for example `^` and `$` matches at the beginning and end of lines respectively in addition to the beginning and end of input.
156156

157157
:::caution
158-
PCRE2 supports only a [limited number of Unicode character properties](https://www.pcre.org/current/doc/html/pcre2pattern.html#uniextseq). For example, `\p{Egyptian_Hieroglyphs}` is supported but `\p{Bidi_Control}` isn't.
158+
PCRE2 supports [some Unicode character properties, but not some Perl properties](https://www.pcre.org/current/doc/html/pcre2pattern.html#uniextseq). For example, `\p{Egyptian_Hieroglyphs}` is supported but `\p{InMusicalSymbols}` isn't.
159159
:::
160160

161161
#### Example: `pattern-regex` combined with other pattern operators

0 commit comments

Comments
 (0)