@@ -11,13 +11,13 @@ class Regex:
1111
1212 @staticmethod
1313 def quotes () -> str :
14- """Matches everything inside quotes. (strings)\n
14+ """Matches pairs of quotes. (strings)\n
1515 --------------------------------------------------------------------------------
1616 Will create two named groups:
1717 - `quote` the quote type (single or double)
1818 - `string` everything inside the found quote pair\n
19- --------------------------------------------------------------------------------
20- Attention: Requires non standard library `regex` not standard library `re`!"""
19+ ---------------------------------------------------------------------------------
20+ Attention: Requires non- standard library `regex`, not standard library `re`!"""
2121 return r'(?P<quote>[\'"])(?P<string>(?:\\.|(?!\g<quote>).)*?)\g<quote>'
2222
2323 @staticmethod
@@ -28,16 +28,16 @@ def brackets(
2828 strip_spaces : bool = True ,
2929 ignore_in_strings : bool = True ,
3030 ) -> str :
31- """Matches everything inside brackets, including other nested brackets.\n
32- --------------------------------------------------------------------------------
31+ """Matches everything inside pairs of brackets, including other nested brackets.\n
32+ -----------------------------------------------------------------------------------
3333 If `is_group` is true, you will be able to reference the matched content as a
3434 group (e.g. `match.group(…)` or `r'\\ …'`).
3535 If `strip_spaces` is true, it will ignore spaces around the content inside the
3636 brackets.
3737 If `ignore_in_strings` is true and a bracket is inside a string (e.g. `'...'`
3838 or `"..."`), it will not be counted as the matching closing bracket.\n
39- --------------------------------------------------------------------------------
40- Attention: Requires non standard library `regex` not standard library `re`!"""
39+ -----------------------------------------------------------------------------------
40+ Attention: Requires non- standard library `regex`, not standard library `re`!"""
4141 g , b1 , b2 , s1 , s2 = (
4242 "" if is_group else "?:" ,
4343 _rx .escape (bracket1 ) if len (bracket1 ) == 1 else bracket1 ,
@@ -73,8 +73,8 @@ def func_call(func_name: Optional[str] = None) -> str:
7373 1. function name
7474 2. the function's arguments\n
7575 If no `func_name` is given, it will match any function call.\n
76- --------------------------------------------------------------------------------
77- Attention: Requires non standard library `regex` not standard library `re`!"""
76+ ---------------------------------------------------------------------------------
77+ Attention: Requires non- standard library `regex`, not standard library `re`!"""
7878 return (
7979 r"(?<=\b)(" + (r"[\w_]+" if func_name is None else func_name ) + r")\s*" + Regex .brackets ("(" , ")" , is_group = True )
8080 )
0 commit comments