Community
    • Login

    Searching for a specific string

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 Posts 2 Posters 221 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.
    • Klemen MočnikK
      Klemen Močnik
      last edited by

      Hello

      I have a massive file that looks like this:

      colbyy:babi5786 | Level = 1 | DD = 1 | CP = 4 | Refunds Remaining = 3 | Email Verified = false | Last visit = 7/23/2018 | TC = 0 | TS = 0
      micky43565:wazzz23545 | Level = 6 | DD = 2478 | CP = 2 | Refunds Remaining = 3 | Email Verified = true | Last visit = 1/11/2017 | TC = 0 | TS = 0
      .
      .

      I would like to isolate and export just the usernames and passwords to a new file, looking like this:

      colbyy:babi5786
      micky43565:wazzz23545
      .
      .

      How could I do that?

      Thanks in advance
      Klemen

      1 Reply Last reply Reply Quote 0
      • PeterJonesP
        PeterJones
        last edited by PeterJones

        On my phone, so cannot test… But my first attempt would be:

        • File > Save As…
        • Edit > Replace
        • Find = (?-s)^(.*?:.*?)(?=\h\|).*
        • Replace = $1
        • Mode = regular expression
        • Try it once with Find Next then Replace
        • If it works, Replace All, else undo

        For more on regex, see the FAQ

        1 Reply Last reply Reply Quote 1
        • Klemen MočnikK
          Klemen Močnik
          last edited by

          Works like a charm… :)

          Thanks a lot!

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