Community
    • Login

    Convert to UPPERCASE

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 Posts 2 Posters 336 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.
    • DarthDataD
      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
        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
          DarthData @Ekopalypse
          last edited by

          @ekopalypse That’s perfect. Thanks!!

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