I've this javascript regular expression that check if an URI is valid (RFC 3986):(我有这个JavaScript正则表达式,用于检查URI是否有效(RFC 3986):)
/^(https?)://((?:[a-z0-9.-]|%[0-9A-F]{2}){3,})(?::(d+))?((?:/(?:[a-z0-9-._~!$&'()*+,;=:@]|%[0-9A-F]{2})*)*)(?:?((?:[a-z0-9-._~!$&'()*+,;=:/?@]|%[0-9A-F]{2})*))?(?:#((?:[a-z0-9-._~!$&'()*+,;=:/?@]|%[0-9A-F]{2})*))?$/i
Now i need to convert that in a MySQL query, using REGEXP
.(现在,我需要使用REGEXP
在MySQL查询中进行转换。)
Eg:(例如:)
SELECT *
FROM table_name t
WHERE t.uri REGEXP '....'
Could you help me?(你可以帮帮我吗?)
ask by Alessio Pascucci translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…