Last active
August 29, 2015 14:14
-
-
Save hoosteeno/9d392f330a8026bb6ed9 to your computer and use it in GitHub Desktop.
get the website from the user profile in MDN
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select substring( | |
misc | |
from ( | |
/* start substring after but not including website key */ | |
locate('"website": ', misc) + 12 | |
) | |
for ( | |
/* the location of the first " after the website key... */ | |
locate('"', misc, locate('"website": ', misc) + 12) | |
/* minus the location of the website key plus the length of the website key */ | |
- (locate('"website": ', misc) + 12) | |
) | |
) | |
as url from user_profiles | |
where misc is not null | |
and misc REGEXP'"website": '; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment