1
0
mirror of https://github.com/cesanta/slre.git synced 2025-03-13 01:05:29 +00:00
slre/docs/syntax.md
Sergey Lyubka 568dae4af7 SLRE docs - README references real docs
PUBLISHED_FROM=7d86931eac76f353b13195fd31b269853aed1e05
2016-06-07 20:45:53 +00:00

31 lines
948 B
Markdown

---
title: "Syntax"
---
```
^ Match beginning of a buffer
$ Match end of a buffer
() Grouping and substring capturing
\s Match whitespace
\S Match non-whitespace
\d Match decimal digit
\n Match new line character
\r Match line feed character
\f Match form feed character
\v Match vertical tab character
\t Match horizontal tab character
\b Match backspace character
+ Match one or more times (greedy)
+? Match one or more times (non-greedy)
* Match zero or more times (greedy)
*? Match zero or more times (non-greedy)
? Match zero or once (non-greedy)
x|y Match x or y (alternation operator)
\meta Match one of the meta character: ^$().[]*+?|\
\xHH Match byte with hex value 0xHH, e.g. \x4a
[...] Match any character from set. Ranges like [a-z] are supported
[^...] Match any character but ones from set
```
Under development: Unicode support.