Better variable regex: accept only one decimal separator in float numbers
This commit is contained in:
parent
febe5cee3f
commit
51a77c695b
@ -11,7 +11,7 @@ __author__ = "Davide Testa"
|
||||
__email__ = "davide@davte.it"
|
||||
__credits__ = ["Marco Origlia", "Nick Lee @Nickoala"]
|
||||
__license__ = "GNU General Public License v3.0"
|
||||
__version__ = "2.9.2"
|
||||
__version__ = "2.9.3"
|
||||
__maintainer__ = "Davide Testa"
|
||||
__contact__ = "t.me/davte"
|
||||
|
||||
|
@ -36,8 +36,9 @@ from davtelepot.utilities import (
|
||||
rows_number_limit = 10
|
||||
|
||||
command_description_parser = re.compile(r'(?P<command>\w+)(\s?-\s?(?P<description>.*))?')
|
||||
variable_regex = re.compile(r"(?P<name>[a-zA-Z][\w]*)\s*=\s*"
|
||||
r"(?P<value>[\d.,]+|True|False|"
|
||||
variable_regex = re.compile(r"(?P<name>[a-zA-Z]\w*)\s*=\s*"
|
||||
r"(?P<value>\d*[.,]?\d+|"
|
||||
r"True|False|"
|
||||
r"'[^']*'|"
|
||||
r"\"[^\"]*\")")
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user