Community
    • Login

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

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 Posts 2 Posters 347 Views 2 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.
    • drippingwaxD Offline
      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 Online
        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 Offline
          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

          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