• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How to find Emoji by grep?

Advocate ,
Feb 06, 2020 Feb 06, 2020

Copy link to clipboard

Copied

Hey Grep-Experts and Emoji-Lovers,

i imported a text from a pdf coming with some characters in Apple Color Emoji. After reformatting the whole text I now want to assign a character-style to all Emojis again.

I can find e.g. with s/r like <01F525> (if i copy/paste the invisible character into s/r), but I cant get all the Emojis, using a grep like <.+>

Does anyone know to find and format these reformatted emoji font?

TOPICS
Import and export

Views

2.0K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Feb 06, 2020 Feb 06, 2020

No need to list them all. The GREP notation supports ranges:

 

[\x{1f600}-\x{1fb00}]

 

where the end value is eyeballed, more or less, because (1) Unicode.org keeps on adding more emoji (instead of, let's say, more useful symbols as those for rare alphabets) and (2) of course you still have to have a font that contains those emojii.

Votes

Translate

Translate
Community Expert ,
Feb 06, 2020 Feb 06, 2020

Copy link to clipboard

Copied

I did not quite undestand your problem, do you mean to say you are not able to find unicode characters using the find grep option? For that you need to use the following format in the find grep dialog

\x{01F525}

 

-Manan

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Feb 06, 2020 Feb 06, 2020

Copy link to clipboard

Copied

Lets say, you have a text filled here and there with some Emojis. Now your formatting goes wrong/overboard and the whole paragraph is set to Minion. How do you find characters, which prior has been an Emoji?

 

I thought I could grep <.+>, because when i copy an Emoji into the clipboard and back into the search&replace-dialog (text or grep), it pastes <01F525>. 

 

So, what do you suggest to find those?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 06, 2020 Feb 06, 2020

Copy link to clipboard

Copied

The <> notation actually denotes the unicode of the character that is to be searched, the number in between <> is the unicode value of the character and that reamins the same irrespective of the font/formatting applied over the character. Now when you find a character you need to know what character it is, in your case you need to know the unicode of the characters that denote the emojis that you use.

If you want an automated solution that finds the emojis in your text then you will have to identify the unicode values that denotes the emojis that you use and then use it in your search string, and use something like

\x{01F525}|\x{01F526}

 

-Manan

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 06, 2020 Feb 06, 2020

Copy link to clipboard

Copied

No need to list them all. The GREP notation supports ranges:

 

[\x{1f600}-\x{1fb00}]

 

where the end value is eyeballed, more or less, because (1) Unicode.org keeps on adding more emoji (instead of, let's say, more useful symbols as those for rare alphabets) and (2) of course you still have to have a font that contains those emojii.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Feb 07, 2020 Feb 07, 2020

Copy link to clipboard

Copied

LATEST

Theunis, thank you again for your vast expertise – didnt knew about the range feature. Its always a pleasure getting help from you (and Uwe, Loic, Kasyan, Harbs, Bob, PeterSpier, vinny, Marc).

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines