How to match an ip address in mysql?

后端 未结 5 999
無奈伤痛
無奈伤痛 2021-01-04 23:15

For example, I am having a column storing data like this.

Apple
12.5.126.40
Smite
Abby
127.0.0.1
56.5.4.8
9876543210
Notes

How to select ou

5条回答
  •  爱一瞬间的悲伤
    2021-01-04 23:53

    This may not be the most efficient way, and it's not technically regex, but it should work:

    SELECT col1 FROM t1 WHERE col1 LIKE '%.%.%.%';
    

提交回复
热议问题