Skip to content

Commit 86ac5b5

Browse files
committed
📝 update documentation PythonRegex
1 parent 51d61ef commit 86ac5b5

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Diff for: pyformlang/regular_expression/python_regex.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,12 @@ class PythonRegex(regex.Regex):
6060
6161
It adds the following features to the basic regex:
6262
63-
* Set of characters with [] (no inverse with [^...])
63+
* Set of characters with []
64+
* Inverse set of character with [^...]
6465
* positive closure +
6566
* . for all printable characters
6667
* ? for optional character/group
68+
* Repetition of characters with {m} and {n,m}q
6769
* Shortcuts: \\d, \\s, \\w
6870
6971
Parameters

Diff for: pyformlang/regular_expression/tests/test_python_regex.py

+2
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,8 @@ def test_error_backslash(self):
313313
self._test_compare(r"[a\\\\\\]]", "\\]")
314314
self._test_compare(r"\"([d\"\\\\]|\\\\.)*\"", '"d\\"')
315315
self._test_compare(r"[a\\\\]", "a")
316+
self._test_compare(r"\"([^\"\\\\]|\\\\.)*\"", '"ddd"')
317+
self._test_compare(r"([a-z_]+:\s([^,\n]+,)*[^,\n]*)", "abho-ja: njzk,szi,szkok")
316318

317319
def test_negation_brackets(self):
318320
self._test_compare(r"[^abc]*", "")

0 commit comments

Comments
 (0)