Last active
April 24, 2017 09:04
-
-
Save soar/051bfabd92b957c04d1d7195afd9c058 to your computer and use it in GitHub Desktop.
MySQL magic
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 | |
_utf8 'а' REGEXP CONCAT('^([', x'D0B0', '-', x'D18F', '])*$') as rus_a_regex_check, | |
HEX('а') as rus_a_hex, | |
_utf8 'г' REGEXP CONCAT('^([', x'D0B0', '-', x'D18F', '])*$') as rus_g_regex_check, | |
HEX('г') as rus_g_hex, | |
_utf8 'т' REGEXP CONCAT('^([', x'D0B0', '-', x'D18F', '])*$') as rus_t_regex_check, | |
HEX('т') as rus_t_hex, | |
_utf8 'у' REGEXP CONCAT('^([', x'D0B0', '-', x'D18F', '])*$') as rus_y_regex_check, | |
HEX('у') as rus_y_hex, | |
_utf8 'я' REGEXP CONCAT('^([', x'D0B0', '-', x'D18F', '])*$') as rus_ya_regex_check, | |
HEX('я') as rus_ya_hex | |
; |
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
*************************** 1. row *************************** | |
rus_a_regex_check: 1 | |
rus_a_hex: D0B0 | |
rus_g_regex_check: 1 | |
rus_g_hex: D0B3 | |
rus_t_regex_check: 0 | |
rus_t_hex: D182 | |
rus_y_regex_check: 0 | |
rus_y_hex: D183 | |
rus_ya_regex_check: 1 | |
rus_ya_hex: D18F | |
1 row in set (0.00 sec) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment