Community
    • Login

    Convert to UPPERCASE

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 Posts 2 Posters 553 Views 1 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.
    • DarthDataD Offline
      DarthData
      last edited by

      Fellow Notepad++ Users,

      Could you please help me the the following search-and-replace problem I am having?

      I have a file with multiple lines the have computer MAC addresses throughout. They are in lowercase format and I simply want to search the entire file and convert them to UPPERCASE.

      The MAC address is in the middle of the lines. I am able to searach and replace, but in order to do the entire document, I end up repeating my code. MAC Example: e0:cb:bc:39:2e:3c
      When done, I want it to look like this: E0:CB:BC:39:2E:3C

      Here is the code I use, but it will only convert the 1st MAC.

      <!-- Find MAC and Convert to Uppercase -->
      <Action type=“3” message=“1700” wParam=“0” lParam=“0” sParam=“” />
      <Action type=“3” message=“1601” wParam=“0” lParam=“0” sParam=“(…:…:…:…:…:…)” />
      <Action type=“3” message=“1625” wParam=“0” lParam=“2” sParam=“” />
      <Action type=“3” message=“1702” wParam=“0” lParam=“512” sParam=“” />
      <Action type=“3” message=“1701” wParam=“0” lParam=“1” sParam=“” />

      <Action type="2" message="0" wParam="42016" lParam="0" sParam="" />	     <!-- UPPERCASE			       -->
      

      What do I need to add in order for it to repeat this through the entire file?

      Thanks for your assistance.

      EkopalypseE 1 Reply Last reply Reply Quote 0
      • EkopalypseE Offline
        Ekopalypse @DarthData
        last edited by

        @victor-fansler

        Maybe another way to solve this problem would be to search with regular expressions like:
        find: \b([A-Fa-f0-9:]{3}){5}[A-Fa-f0-9]{2}\b
        replace with:\U$0

        DarthDataD 1 Reply Last reply Reply Quote 4
        • DarthDataD Offline
          DarthData @Ekopalypse
          last edited by

          @ekopalypse That’s perfect. Thanks!!

          1 Reply Last reply Reply Quote 1

          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