Navigation

    CreatiCode Scratch Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • CreatiCode

    How would i split by emoji?

    Help
    4
    10
    66
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • jeffreyrb03-gmail
      JaecadeJnight Mod Helper last edited by

      I have a project here, displaying a list with every single emoji:

      https://play.creaticode.com/projects/68941e23be82be430b48587f

      Now I want to make a table with two columns, Emoji, and Name. I need to use this list, but my issue is that I’m not sure how to make that table using this list. The main issue I’m facing is that emojis are not one character all the time. For instance, while “a” and “🇩🇴” are visually one character, they actually aren’t because emojis sometimes use zero width joiners and even skin tone modifiers, for instance, when 👊🏼 is expanded you can see the fist and the skin tone modifier.

      Is there an easy way or possible regex thing I could use to split a string like “😀 smiley face” into “😀” and “smiley face” to put into a table?

      #LLJW
      <span style="color:white;background-image:linear-gradient(to right, lightblue, navy)">My name is Jeff</span>

      DreamSMP_Luck info-creaticode 2 Replies Last reply Reply Quote 0
      • DreamSMP_Luck
        DreamSMP_Luck Best Forum Helpers @jeffreyrb03-gmail last edited by

        @jeffreyrb03-gmail no code is connected in the code, how does it work

        "Ohh, something important to me, maybe…? <3"
        -Mitsuba Sousuke 🌸

        jeffreyrb03-gmail 1 Reply Last reply Reply Quote 1
        • info-creaticode
          CreatiCode @jeffreyrb03-gmail last edited by

          @jeffreyrb03-gmail

          Maybe you can split each item in the list by SPACE, then the first part will be the emoji? And the rest of the item will be the name?

          jeffreyrb03-gmail 2 Replies Last reply Reply Quote 1
          • jeffreyrb03-gmail
            JaecadeJnight Mod Helper @DreamSMP_Luck last edited by

            @dreamsmp_luck i’m just showing a list, which doesn’t need code. However i did use code to create the list from a string, but you can click the blocks and then its not needed to have a green flag block.

            #LLJW
            <span style="color:white;background-image:linear-gradient(to right, lightblue, navy)">My name is Jeff</span>

            1 Reply Last reply Reply Quote 0
            • jeffreyrb03-gmail
              JaecadeJnight Mod Helper @info-creaticode last edited by

              @info-creaticode said in How would i split by emoji?:

              @jeffreyrb03-gmail

              Maybe you can split each item in the list by SPACE, then the first part will be the emoji? And the rest of the item will be the name?

              Oh wait, that is true. That should work because there’s a space after each emoji. Thank you, I didn’t see that.

              #LLJW
              <span style="color:white;background-image:linear-gradient(to right, lightblue, navy)">My name is Jeff</span>

              1 Reply Last reply Reply Quote 0
              • jeffreyrb03-gmail
                JaecadeJnight Mod Helper @info-creaticode last edited by

                @info-creaticode I’ve figured it out, I can just delete all words and then trim extra whitespace with regex easily. Your suggestion helped me get there, so thank you!
                IMG_0126.jpeg

                #LLJW
                <span style="color:white;background-image:linear-gradient(to right, lightblue, navy)">My name is Jeff</span>

                info-creaticode 1 Reply Last reply Reply Quote 0
                • info-creaticode
                  CreatiCode @jeffreyrb03-gmail last edited by

                  @jeffreyrb03-gmail

                  How about this?

                  ffec8e60-42cd-49c8-923b-55b8bcaae518-image.png

                  jeffreyrb03-gmail 3 Replies Last reply Reply Quote 1
                  • jeffreyrb03-gmail
                    JaecadeJnight Mod Helper @info-creaticode last edited by

                    @info-creaticode oh that works perfect! Thank you

                    #LLJW
                    <span style="color:white;background-image:linear-gradient(to right, lightblue, navy)">My name is Jeff</span>

                    1 Reply Last reply Reply Quote 0
                    • jeffreyrb03-gmail
                      JaecadeJnight Mod Helper @info-creaticode last edited by

                      @info-creaticode oh wait, not entirely IMG_0127.jpeg
                      item 8 is 😂 face with tears of joy

                      i’m trying out the regex still and i’ll give updates on my results

                      #LLJW
                      <span style="color:white;background-image:linear-gradient(to right, lightblue, navy)">My name is Jeff</span>

                      1 Reply Last reply Reply Quote 0
                      • jeffreyrb03-gmail
                        JaecadeJnight Mod Helper @info-creaticode last edited by

                        @info-creaticode I managed to do it
                        https://play.creaticode.com/projects/68941e23be82be430b48587f

                        #LLJW
                        <span style="color:white;background-image:linear-gradient(to right, lightblue, navy)">My name is Jeff</span>

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post