MCPcopy Create free account
hub / github.com/Hel10-Web/Databasetools / ReString

Function ReString

pac/redis_string.go:51–55  ·  view source on GitHub ↗

正则匹配

(info interface{}, s string)

Source from the content-addressed store, hash-verified

49
50// 正则匹配
51func ReString(info interface{}, s string) string {
52 reg := regexp.MustCompile(s)
53 list := reg.FindAllStringSubmatch(info.(string), -1)
54 return list[0][0]
55}
56
57// Redis 字符串
58func redisString(i interface{}) string {

Callers 2

RedisCmdFunction · 0.85
redisVersionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected