How to create search query to show all notes with emojis?

I can’t figure out a way to show a list of all notes with emojis:

Things I have tried

I’m using the “icon-shortcodes” plugin and with the setting “replace emoji shortcode with emoji character”.
I can search for a specific emoji if a copy&paste an emoji from a note into the search box, or if I use the (cumbersome) windows emoji keyboard.

What I’m trying to do

What I would like is to have a search that shows all notes with emojis.
Is that possible with a regEx?

I also looked into dataview but it can’t search the note body at the moment.

There is a workaround where you can create tags with emojis. I didn’t try that yet because I don’t want extra connections in the graph view. I guess I could just filter them out if I use a #emoji prefix …

Another option might be to keep the emoji shortcode setting (:laugh…ing:).
That might be easier to create a regEx for the search?

Thanks!

1 Like

if I copy and paste this in the search it will find notes containing any of those emojies
😀 OR 😁 OR 😂 OR 🤣 OR 😃 OR 😄 OR 😅 OR 😆👿 OR 😉 OR 😊 OR 😋 OR 😎 OR 😍 OR 😘 OR 🥰 OR 😗 OR 😙 OR 😚 OR ☺️ OR 🙂 OR 🤗 OR 🤩 OR 🤔 OR 🤨 OR 😐 OR 😑 OR 😶 OR 🙄 OR 😏 OR 😣 OR 😥 OR 😮 OR 🤐 OR 😯 OR 😪 OR 😫 OR 😴 OR 😌 OR 😛 OR 😜 OR 😝 OR 🤤 OR 😒 OR 😓 OR 😔 OR 😕 OR 🙃 OR 🤑 OR 😲 OR ☹️ OR 🙁 OR 😖 OR 😞 OR 😟 OR 😤 OR 😢 OR 😭 OR 😦 OR 😧 OR 😨 OR 😩 OR 🤯 OR 😬 OR 😰 OR 😱 OR 🥵 OR 🥶 OR 😳 OR 🤪 OR 😵 OR 😡 OR 😠 OR 🤬 OR 😷 OR 🤒 OR 🤕 OR 🤢 OR 🤮 OR 🤧 OR 😇 OR 🤠 OR 🤡 OR 🥳 OR 🥴 OR 🥺 OR 🤥 OR 🤫 OR 🤭 OR 🧐 OR 🤓 OR 😈 OR 😆

But that’s not very practical.
I’ve tried to use this regEx from StackOverflow

/(\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff])/g

but it didn’t work.

Any ideas how I can get a regEx search for unicode character ranges to work?

this RegEx seems to do the trick for me
/([\ud000-\udfff])/
it works in the search box and with the query code.

It probably won’t find all emojis but it’s good enough for my use.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.