Community
    • Login

    Delete numbers following letters ( i.e. \w\d+\s becomes \w\s)

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 Posts 2 Posters 606 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.
    • Luís GonçalvesL Offline
      Luís Gonçalves
      last edited by

      Hello everyone.

      I’m having a hard time trying to delete the numbers that follow letters in a text I’m working on. Let me explain:

      I basically converted a PDF to TXT, but in so doing, some words got some numbers attached to them (ex: “mindful2” or “ready27”) because those were references to notes to the text in the original PDF.

      Is there a way to delete only the numbers that immediately follow letters (something like \w\d+\s )?

      Thanks in advance!

      Alan KilbornA 1 Reply Last reply Reply Quote 0
      • Alan KilbornA Offline
        Alan Kilborn @Luís Gonçalves
        last edited by Alan Kilborn

        @Luís-Gonçalves

        …only the numbers that immediately follow letters

        To provide what you’ve asked for:

        Find: (?i)(?<=[a-z])\d+
        Search mode: Regular expression

        (Hmm, after the fact I notice that you are a repeat regexer – but you did provide a “what I tried”, so…)

        Luís GonçalvesL 1 Reply Last reply Reply Quote 2
        • Luís GonçalvesL Offline
          Luís Gonçalves @Alan Kilborn
          last edited by

          @Alan-Kilborn you’re right! Haha. Sorry about that, I’m just finding how regular expressions work (and I’m loving it, even though it’s hard to learn all by oneself)… so I’m sorry if sometimes my questions are more or less repetitive -.-’

          1 Reply Last reply Reply Quote 1

          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