-
Notifications
You must be signed in to change notification settings - Fork 2
Closed
Labels
Milestone
Description
Hi Son,
derived from the regular expression and naming proposals in
and also based on
I created this regular expression as naming convention for the Testsuites Management:
"^[\p{L}_][\p{L}0-9_\+\-\*/]*$"
It seems to work properly in pure Python:
search_pattern = "^[\p{L}_][\p{L}0-9_\+\-\*/]*$"
regex_pattern = re.compile(search_pattern)
key_name = "123" # not allowed
key_name = "a123" # allowed
key_name = "_a123" # allowed
key_name = "𠼭_a123" # allowed
key_name = "𠼭_a€123" # not allowed
key_name = "𠼭_a#123" # not allowed
key_name = "𠼭_a-123" # allowed
key_name = "𠼭_a+123" # allowed
key_name = "𠼭_a*123" # allowed
key_name = "𠼭_a/123" # allowed
key_name = "$-𠼭_a/123" # not allowed
key_name = "[$-??_a/123]" # not allowed
key_name = "{$-??_a/123}" # not allowed
In CJasonPreprocessor.py
I exchanged
import re
by
import regex as re
But I get other (invalid) results than above in pure Python (names are accepted instead of being declined).
OK, maybe 'import regex as re' only is too simple and further adaptions in the JsonPreprocessor code are requiered.
But maybe you can check this and give "^[\p{L}_][\p{L}0-9_\+\-\*/]*$" a chance.
Metadata
Metadata
Assignees
Labels
Projects
Status
Done