Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c08fe14

Browse filesBrowse files
committed
Add formal definition
1 parent 5c25c0a commit c08fe14
Copy full SHA for c08fe14

File tree

1 file changed

+8
-2
lines changed
Filter options

1 file changed

+8
-2
lines changed

‎README.md

Copy file name to clipboardExpand all lines: README.md
+8-2Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,14 @@ With this code you can convert regular expression given in the Python format to
1414

1515
For a quick guide on Python regex, see the [official documentation](https://docs.python.org/3/howto/regex.html).
1616

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.
1925
2026

2127
## Usage

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.