-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Emoji Regex #8
Comments
If i get the string after typing them in the code unit field has [65039, 65039, 65039, 65039, 65039, 65039] as a value. This seems to be this |
Could you try and use this regex it seems to fix the problem https://github.com/mathiasbynens/emoji-regex/blob/master/index.js |
@febg11 it's kinda different, the regex by Use this TextField(
onChanged: (text) {
print("Word count: " + text.length.toString());
},
inputFormatters: [
BlacklistingTextInputFormatter(RegExp(
r'(\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff]|\ufe0f)'
))
],
) |
Hi @petehouston Sorry for not replying for a long time I only just got around to doing this. I have tested your regex which fixes a lot of my problems however it does not detect the English, Welsh and Scottish flags as well as the unofficial flags which can be seen on here. This is part of my test that fails.
I am not sure what the unofficial flags even are. Could you help me adjust the regex to ensure that the British flags and possibly the unofficial flags are black listed in the regex. Thank you so much for all you have done. |
Interesting. I will take a look on those emojis. |
Thanks Pete I really appreciate your help ๐ |
Hi Pete did you manage to take a look at this? |
I was wondering if you could help me with blocking emojis from being typed into input boxes.
The emoji ๐ฌ๏ธ (and a few others) still get typed into input boxes that have been blacklisted with your regex.
They dont get typed but they get counted as input. E.g. if you have a hint in the text box (or character count) and type the emoji the hint will disappear and the character count will increase to 1. There is actually no input in the box, just empty space.
The text was updated successfully, but these errors were encountered: