Community
    • Login

    I can't get search and replace to work anymore.

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 Posts 2 Posters 120 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.
    • drippingwaxD
      drippingwax
      last edited by

      Specifically, I am trying to do a few things at once.
      I want to search for “No Citadel” or “Level ?” [1-6"] with spaces before it and a CR afterwards and replace the spaces and CR with a tab.
      I did this once, but lost it,

      As far as I know, something like:
      “\s+(No Citadel|Level ?)\R”
      “\1\t”
      should work, but I cannot figure out what I am doing wrong.
      Are any of you willing to help? :)

      This is for a game from the 80s and 90s called Tradewars 2002 and due to the inherent limitations of the system, it creates tables using a monotype font, and each row requires two rows on-screen, so I like to export and format it to make it easier to read.

      Thank you very much! Please enjoy your day! :)

      PeterJonesP 1 Reply Last reply Reply Quote 1
      • PeterJonesP
        PeterJones @drippingwax
        last edited by

        @drippingwax said in I can't get search and replace to work anymore.:

        should work, but I cannot figure out what I am doing wr

        The question mark has special meaning to Notepad++ regex: “0 or 1 of whatever came right before”. So in your expression, it means “0 or 1 spaces”, which is not what you want.

        \? matches a literal question mark
        But given 1-6", I think you want \d to match a digit character

        drippingwaxD 1 Reply Last reply Reply Quote 3
        • drippingwaxD
          drippingwax @PeterJones
          last edited by

          @PeterJones Thanks. Also, I forgot to turn on Regular expression. Can you believe it?! What a noob! :D

          It works now! Thanks!

          1 Reply Last reply Reply Quote 2
          • First post
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors