Community
    • Login

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

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 Posts 2 Posters 292 Views
    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
      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
        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
          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
          • First post
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors