Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
bom_server
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
f69088f7
authored
Jul 01, 2020
by
mushishixian
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
正则问题
parent
f1f14bea
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
2 deletions
internal/logic/attr.go
internal/logic/attr.go
View file @
f69088f7
...
...
@@ -164,11 +164,9 @@ func splitAttrs(attrs string) (result []string) {
//提取参数
func
extractAttr
(
attr
string
)
[]
string
{
fmt
.
Println
(
attr
)
regexpUnit
:=
strings
.
Join
(
getNeedCheckUnit
(),
"|"
)
r
,
_
:=
regexp
.
Compile
(
"(
\\
d+[
\\
/
\\
d. ]*|
\\
d)("
+
regexpUnit
+
")"
+
""
)
res
:=
r
.
FindAllString
(
attr
,
100
)
fmt
.
Println
(
res
)
return
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