Community
    • Login

    Put first word in each line in quotes

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 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.
    • UHAX The GreyU
      UHAX The Grey
      last edited by UHAX The Grey

      Hi again,

      I have the following example

      Bit1 “Bit2 Bit3 Bit4 Bit5”

      I need to change all lines (over 40,000)

      So it looks like this

      “Bit1” “Bit2 Bit3 Bit4 Bit5”

      Basically I need to put the first word of each line into quotes. Any idea how I can do this with regex?

      I should note that after the first word its a tab char not a space that follows it!

      Regards,

      EkopalypseE 1 Reply Last reply Reply Quote 0
      • EkopalypseE
        Ekopalypse @UHAX The Grey
        last edited by Ekopalypse

        @UHAX-The-Grey

        A regex like the following could work

        find: ^\w+(?=\t)
        replace: "$0"

        UHAX The GreyU 1 Reply Last reply Reply Quote 2
        • UHAX The GreyU
          UHAX The Grey @Ekopalypse
          last edited by

          @Ekopalypse That worked, thank you!

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