The Fisrt Updated

This commit is contained in:
2026-01-25 13:54:16 +08:00
commit 4c90aec977
19 changed files with 1037 additions and 0 deletions

14
text.py Normal file
View File

@@ -0,0 +1,14 @@
import re
import shlex
def GetRulesConvertedToJson2(s):
result = {}
key, values = re.match(r'(\w+)\s(.+)', s).groups()
lexer = shlex.shlex(values, posix=True)
lexer.whitespace += ','
lexer.whitespace_split = True
lexer.quotes = "'"
result[key] = list(lexer)
return result
print(GetRulesConvertedToJson2("VEG 1,2,'123 23',5"))