Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
lichenggang
/
bom_identify
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
0b784f1b
authored
Jan 20, 2021
by
陈森彬
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
优化匹配正则
parent
57478123
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
utils/functions.py
utils/functions.py
View file @
0b784f1b
...
...
@@ -3,7 +3,7 @@
import
re
from
config
import
unit_map
,
cast_map
,
unit_regex
unit_pattern
=
re
.
compile
(
'(
\
d+|
\
d+[
\\
\
./]
\
d+)('
+
unit_regex
+
')'
)
unit_pattern
=
re
.
compile
(
'(
\
d+|
\
d+[
\\
\
./]
\
d+)('
+
unit_regex
+
')
([.*a-zA-Z]?)
'
)
def
is_float
(
s
):
...
...
@@ -60,7 +60,8 @@ def check_param(kw):
else
:
new_list
=
[]
for
param
in
check_res
:
new_list
.
append
(
param
[
0
]
+
param
[
1
])
if
not
param
[
2
]
.
isalpha
():
new_list
.
append
(
param
[
0
]
+
param
[
1
])
check_res
=
new_list
return
check_res
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment