正则表达式速查表
快速查阅正则语法,包括字符类、量词、锚点、分组、环视和转义。
使用方法
Using the cheat sheet
Search for a token or a description to filter the table, then use the pattern directly in JavaScript, Python or any engine that follows the common syntax.
- Search for a pattern or keyword.
- Read the description.
- Copy the token into your expression.
常见问题
Which regex flavour is this?
The common Perl-compatible subset supported by JavaScript, Python, Java and most other engines.
Does the dot match newlines?
By default it does not. Enable the s (dotAll) flag in JavaScript or re.DOTALL in Python if you need it to.