• Login
Community
  • Login

Find and Replace

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
6 Posts 3 Posters 416 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.
  • T
    Tiến Bean
    last edited by Apr 16, 2022, 4:27 PM

    I’m having a letter replacement problem:
    find: (n)|(u)|(o)
    replace: (?1&)(?2Ã)(?34)

    I want the o to be a 4. But maybe this Notepad++ is misreading the order as 34. So is there any way I can turn the o into a 4 without error?

    P 1 Reply Last reply Apr 16, 2022, 4:43 PM Reply Quote 0
    • P
      PeterJones @Tiến Bean
      last edited by Apr 16, 2022, 4:43 PM

      @tiến-bean

      https://npp-user-manual.org/docs/searching/#substitution-conditionals

      (?{3}4) for the last term

      T N 2 Replies Last reply Apr 16, 2022, 6:00 PM Reply Quote 3
      • T
        Tiến Bean @PeterJones
        last edited by Apr 16, 2022, 6:00 PM

        @peterjones thanks you 🥳

        1 Reply Last reply Reply Quote 0
        • N
          Neil Schipper @PeterJones
          last edited by Apr 17, 2022, 3:33 PM

          @peterjones said in Find and Replace:

          https://npp-user-manual.org/docs/searching/#substitution-conditionals
          (?{3}4) for the last term

          Peter, that substitution expression (which provides the desired functionality) contradicts the spec, which says that without the {}, “a single decimal digit (0-9)” will be used to identify the match group to test. Perhaps the spec should indicate that in the basic case of ?ℕYesPattern:NoPattern, YesPattern must not start with a digit.

          P 1 Reply Last reply Apr 18, 2022, 12:05 AM Reply Quote 2
          • P
            PeterJones @Neil Schipper
            last edited by Apr 18, 2022, 12:05 AM

            @neil-schipper ,

            That’s probably a good clarification

            P 1 Reply Last reply Apr 19, 2022, 5:20 PM Reply Quote 1
            • P
              PeterJones @PeterJones
              last edited by Apr 19, 2022, 5:20 PM

              @peterjones said in Find and Replace:

              @neil-schipper ,

              That’s probably a good clarification

              issue #349 => PR #350

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