Can anyone tell me how I would write a ruby regexp in ruby 1.8.7 to detect the presence of a 4-byte unicode character (specifically the emoji)? I am trying to handle the fact that mysql does not, by default, allow you to store 4-byte emoji unicode characters, now in use by iOS 5.
Thanks!
This appears to match the first two bytes of the four bytes that represent emoji. This is being run in ruby 1.8.7.
str.match(/\360\237/)