• Login
Community
  • Login

Replace with "[\U\1]" always make word missing inside squared bracket

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
5 Posts 2 Posters 294 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.
  • M
    Mohamed Mohamed
    last edited by Jul 31, 2023, 10:22 AM

    As the title say when I type “[\U\1]” it always made the word missing.
    Before
    a7d492cf-dc72-474b-b5f2-6e7f0403731b-image.png
    After
    c14fead3-2a93-4cde-82c9-3d78adb08ca9-image.png

    P 1 Reply Last reply Jul 31, 2023, 11:53 AM Reply Quote 0
    • P
      Pierre Åberg @Mohamed Mohamed
      last edited by Jul 31, 2023, 11:53 AM

      @Mohamed-Mohamed
      I am somewhat of a beginner when it comes to regular expressions, but I think your problem is with the “find what” section that don’t group the dr.
      You could try this:
      Find what: (dr)
      Replace with: [\U\1]

      This is if you want the result to be [DR] if you are expecting the result DR you just replace with \U\1 instead.

      M 1 Reply Last reply Jul 31, 2023, 11:59 AM Reply Quote 1
      • M
        Mohamed Mohamed @Pierre Åberg
        last edited by Mohamed Mohamed Jul 31, 2023, 11:59 AM Jul 31, 2023, 11:59 AM

        @Pierre-Åberg Actually I want to be [Dr Knox]

        P 1 Reply Last reply Jul 31, 2023, 12:06 PM Reply Quote 0
        • P
          Pierre Åberg @Mohamed Mohamed
          last edited by Pierre Åberg Jul 31, 2023, 12:36 PM Jul 31, 2023, 12:06 PM

          @Mohamed-Mohamed
          Given the picture I would assume that it’s now [dr. knox]
          If this assumption is right you could try this:
          Find what: (\<dr\>)
          Replace with \u\1

          This will replace the lowercase d with an uppercase d.

          Updated the post just in case you have dr somewhere in the middle of a word, such as android.
          This will make sure that it looks for the word dr and not the letter d directly followed by the letter r.

          M 1 Reply Last reply Jul 31, 2023, 12:34 PM Reply Quote 1
          • M
            Mohamed Mohamed @Pierre Åberg
            last edited by Jul 31, 2023, 12:34 PM

            @Pierre-Åberg Thanks.

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