Community
    • Login

    Removing numbers and emoji

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    6 Posts 4 Posters 4.4k Views 1 Watching
    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.
    • Joss MedinaJ Offline
      Joss Medina
      last edited by

      i want to remove the number, dot(.) and emoji.
      Can someone please provide some suggestions

      BEFORE:

      1.🐯 to export
      2.🐲 chain
      3.🐲 process fees
      4.🐲 수고하다
      5.🐯 수입품
      6.🐲 수입하다

      AFTER:

      to export
      chain
      process fees
      수고하다
      수입품
      수입하다

      astrosofistaA 1 Reply Last reply Reply Quote 0
      • astrosofistaA Offline
        astrosofista @Joss Medina
        last edited by

        Hi @Joss-Medina

        Try this:

        Place the caret at the beginning of the first line to change. Then open the Find panel and copy the following line:

        Find what: (?-s)^\d+[^ ]+?\x20
        Replace with: [leave empty]

        Select the Regular expression search mode, and click the Replace All button.

        Hope it helps.

        Joss MedinaJ 1 Reply Last reply Reply Quote 2
        • Joss MedinaJ Offline
          Joss Medina @astrosofista
          last edited by

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • guy038G Offline
            guy038
            last edited by guy038

            Hello, @joss-medina, @astrosofista and All,

            @astrosofista, as all the emoji symbols, in OP text, have an Unicode code-point over the Basic Mutilingual Plane ( BMP ), so above \x{FFFF}, our Boost regex engine is, generally, not able to find them properly :-(

            So instead of using a negative character class [^....] , which, obviously, does not work, I would suggest the classical regex syntax, below, which matches, from beginning of line, the shortest range of standard characters till a Space char :

            SEARCH (?-s)^.+?\x20

            REPLACE Leave EMPTY

            Best Regards,

            guy038

            astrosofistaA 1 Reply Last reply Reply Quote 3
            • PeterJonesP Online
              PeterJones
              last edited by

              Given that @Joss-Medina specifically indicated lines starting with a number, I’d recommend a hybrid of @astrosofista’s and @guy038’s solutions:

              • FIND WHAT = (?-s)^\d+.+?\x20

              Like @astrosofista’s solution, this requires that the line start with one or more digits. Like @guy038’s solution, it allows any characters between the digits and the space.

              1 Reply Last reply Reply Quote 3
              • astrosofistaA Offline
                astrosofista @guy038
                last edited by

                @guy038 said in Removing numbers and emoji:

                our Boost regex engine is, generally, not able to find them properly

                @guy038, yes sorry, you’re right, I was misguided by my PCRE education :(

                1 Reply Last reply Reply Quote 2

                Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                With your input, this post could be even better 💗

                Register Login
                • First post
                  Last post
                The Community of users of the Notepad++ text editor.
                Powered by NodeBB | Contributors