File tree 1 file changed +8
-2
lines changed
Filter options
1 file changed +8
-2
lines changed
Original file line number Diff line number Diff line change @@ -14,8 +14,14 @@ With this code you can convert regular expression given in the Python format to
14
14
15
15
For a quick guide on Python regex, see the [ official documentation] ( https://docs.python.org/3/howto/regex.html ) .
16
16
17
- ### TODO
18
- - [ ] Add formal definition
17
+ ## Formal Definition
18
+ This is the formal definition we convert Python regex to:
19
+ - ` a, b, c, ... ` : members of the alphabet used in the expression
20
+ - ` ab ` or ` a&b ` : the concatenation of ` a ` and ` b ` (i.e., ` a ` must be directly followed by ` b ` )
21
+ - ` a|b ` : the choice of ` a ` or ` b ` (i.e., either ` a ` or ` b ` is accepted); other literature also uses ` + `
22
+ - ` a* ` : the Kleene Star operator (i.e., ` a ` can be repeated 0 or more times)
23
+
24
+ > Furthermore, use ` \e ` for an empty string in inputs.
19
25
20
26
21
27
## Usage
You can’t perform that action at this time.
0 commit comments