You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
348 B
17 lines
348 B
package regx
|
|
|
|
import (
|
|
"fmt"
|
|
"testing"
|
|
)
|
|
|
|
func TestRegx_IsIp(t *testing.T) {
|
|
fmt.Println(regx.IsIp("114.114.114.114"))
|
|
fmt.Println(regx.IsIp("114.114.114.314"))
|
|
fmt.Println(regx.IsIp("www.baidu.com"))
|
|
|
|
fmt.Println(regx.IsIpRegx("114.114.114.114"))
|
|
fmt.Println(regx.IsIpRegx("114.114.114.314"))
|
|
fmt.Println(regx.IsIpRegx("www.baidu.com"))
|
|
}
|