I've this javascript regular expression that check if an URI is valid (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.
Eg:
SELECT *
FROM table_name t
WHERE t.uri REGEXP '....'
Could you help me?
'chars inside'...'string literals. 2) Replace all(?:with(. 3) Certainly remove the first/and last/iand all\/with/, 4) Replace\dwith[0-9]. 5) Most likely, replace\?with\\?