Community
    • Login

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

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    5 Posts 2 Posters 285 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.
    • Mohamed MohamedM
      Mohamed Mohamed
      last edited by

      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

      Pierre ÅbergP 1 Reply Last reply Reply Quote 0
      • Pierre ÅbergP
        Pierre Åberg @Mohamed Mohamed
        last edited by

        @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.

        Mohamed MohamedM 1 Reply Last reply Reply Quote 1
        • Mohamed MohamedM
          Mohamed Mohamed @Pierre Åberg
          last edited by Mohamed Mohamed

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

          Pierre ÅbergP 1 Reply Last reply Reply Quote 0
          • Pierre ÅbergP
            Pierre Åberg @Mohamed Mohamed
            last edited by Pierre Åberg

            @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.

            Mohamed MohamedM 1 Reply Last reply Reply Quote 1
            • Mohamed MohamedM
              Mohamed Mohamed @Pierre Åberg
              last edited by

              @Pierre-Åberg Thanks.

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