Fix username/hashtag regexp
This commit is contained in:
parent
5d02321705
commit
c9ba00cad7
1 changed files with 1 additions and 1 deletions
2
util.go
2
util.go
|
|
@ -11,7 +11,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
reHashtag = regexp.MustCompile(`\B(\#\w+\b)`)
|
reHashtag = regexp.MustCompile(`\B(\#\S+\b)`)
|
||||||
reTwitterURL = regexp.MustCompile(`https:(\/\/t\.co\/([A-Za-z0-9]|[A-Za-z]){10})`)
|
reTwitterURL = regexp.MustCompile(`https:(\/\/t\.co\/([A-Za-z0-9]|[A-Za-z]){10})`)
|
||||||
reUsername = regexp.MustCompile(`\B(\@\S{1,15}\b)`)
|
reUsername = regexp.MustCompile(`\B(\@\S{1,15}\b)`)
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue