我想,根據圖案 xxx.xxx所有行頭(只) 其中x是從1到9或任何字母一批Mysql的正則表達式容易
我表達不工作REGEXP '[a-z]{1,3}\.[a-z]{1,3}'
Thx!
UPD:Thx所有,但不起作用! 我tryed這麼
SELECT email, registered, voted, ip, agent
FROM `voters`
WHERE member =199
AND DATE_FORMAT(voted, '%Y-%m-%d') < '2014-09-23'
AND SUBSTRING_INDEX(email, '@', 1)
REGEXP '[a-zA-Z1-9]{3}\.[a-zA-Z1-9]{3}'
結果:
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
UPD 2:Itryed變化圖案,從而'[a-zA-Z1-9]{3}[\.]{1}[a-zA-Z1-9]{3}'
結果:
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
沒有好,becouse前後超過3個符號「 「。
試試'[A-ZA-Z1-9] {3} \ [A-ZA-Z1-9] {3}' – 2014-09-24 13:08:14
不起作用,經過3個符號和幾個「。」 – 2014-09-24 13:23:04