• Login
Community
  • Login

Regex - Hex Code Not Working as Expected

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
9 Posts 2 Posters 354 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.
  • S
    Sylvester Bullitt
    last edited by Sylvester Bullitt Jun 27, 2024, 10:49 PM Jun 27, 2024, 10:41 PM

    This post is deleted!
    P S 2 Replies Last reply Jun 27, 2024, 10:50 PM Reply Quote 0
    • P
      PeterJones @Sylvester Bullitt
      last edited by Jun 27, 2024, 10:50 PM

      @Sylvester-Bullitt ,

      with an actual SoftHyphen, and not the ASCII hyphen that’s in your post, it works for me:

      1bfb1b83-89f4-417d-8c56-3f3a9ab1028d-image.png

      S 2 Replies Last reply Jun 27, 2024, 11:03 PM Reply Quote 1
      • S
        Sylvester Bullitt @PeterJones
        last edited by Jun 27, 2024, 11:03 PM

        This post is deleted!
        P 1 Reply Last reply Jun 27, 2024, 11:06 PM Reply Quote 0
        • P
          PeterJones @Sylvester Bullitt
          last edited by PeterJones Jun 27, 2024, 11:07 PM Jun 27, 2024, 11:06 PM

          @Sylvester-Bullitt ,

          That is the correct sequence of bytes for UTF-8 encoding of U+00AD – every character above U+007F takes at least two bytes to encode in UTF-8.

          But Notepad++ knows this, and if it reads it as UTF-8, it will display the soft-hyphen as shown in my screenshot (or as nothing, if you have View > Show Symbol > Show Non-Printing Characters turned off) – and when it is properly in UTF-8 mode (see your status bar, lower right), then it will match with the regex I showed in my screenshot.

          fuller screenshot with encoding shown:
          964341d0-c262-48b1-86e7-581ff4ef797f-image.png

          S 2 Replies Last reply Jun 27, 2024, 11:10 PM Reply Quote 1
          • S
            Sylvester Bullitt @PeterJones
            last edited by Jun 27, 2024, 11:10 PM

            This post is deleted!
            1 Reply Last reply Reply Quote 0
            • S
              Sylvester Bullitt @PeterJones
              last edited by Jun 27, 2024, 11:17 PM

              This post is deleted!
              1 Reply Last reply Reply Quote 0
              • S
                Sylvester Bullitt @PeterJones
                last edited by Jun 27, 2024, 11:30 PM

                This post is deleted!
                1 Reply Last reply Reply Quote 0
                • S
                  Sylvester Bullitt @Sylvester Bullitt
                  last edited by Jun 27, 2024, 11:40 PM

                  This post is deleted!
                  P 1 Reply Last reply Jun 27, 2024, 11:48 PM Reply Quote 0
                  • P
                    PeterJones @Sylvester Bullitt
                    last edited by PeterJones Jun 29, 2024, 9:24 PM Jun 27, 2024, 11:48 PM

                    @Sylvester-Bullitt ,

                    But when I type the same string into the forum dialog, the soft hyphen doesn’t show as it did before

                    That’s because soft-hyphen is a non-printing character, and the forum doesn’t display non-printing characters (because they have no glyph to display). As I said in my first reply, your original paste into the forum used a normal ASCII hyphen, which is why it was visible in the forum.

                    [deleted post]

                    I originally commented on your deleted post (yes, as a moderator, I can see it), but I decided to retract that part, because maybe you deleted it because you already realized what you did wrong.

                    I’m going to have to shut down for the night

                    Sounds like you need the sleep. I hope (by the time you read this) that you got it.

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