• Login
Community
  • Login

Quick database rip

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
3 Posts 2 Posters 1.3k 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.
  • X
    Xavier Xenoph
    last edited by Xavier Xenoph Dec 25, 2017, 4:22 AM Dec 25, 2017, 4:21 AM

    Hello I am on windows using the latest notepad + +. i have a database file that is in a specific order like it is below i ripped the data out for privacy reasons anyway i can just have everything removed but the hash ID every hash ID is the same length 32 characters long and can include numbers letters and capital letters would really hate to search each specific string 1 by 1 then manually delete the after math.

    IPHERE | DATE: | HWID: | password: | audioid: | hashid : |

    to explain abit about the database whee IPHERE is it shows the users IPv4 or v6 the date shows the date they uploaded the content including time stamp with am/pm the HWID shows their hardware ID for the white list and the password shows heir password for the white list the audioid shows the asset ID (in numbers) that they uploaded and the hashid is the audios asset IDs server hash.

    1 Reply Last reply Reply Quote 0
    • X
      Xavier Xenoph
      last edited by Dec 25, 2017, 5:29 AM

      i used box selection (alt + click and drag) to do it not as efficient if there was a simpler way to do it still looking for a solution thought as ill have many more of these

      1 Reply Last reply Reply Quote 0
      • G
        guy038
        last edited by guy038 Dec 25, 2017, 4:43 PM Dec 25, 2017, 10:45 AM

        Hello @xavier-xenoph,

        It’s not very clear what you want to achieve, but, to my mind, you would like to change all records of your database file :

        IPHERE | DATE: | HWID: | password: | audioid: | hashid : |
        

        as :

        | hashid : |
        

        Am I right about it ?


        If so :

        • Open your database file, in N++

        • Open the Replace dialog ( Ctrl + H )

        SEARCH (?-s)^.+(?=\|.+\|$)

        REPLACE Leave EMPTY

        OPTIONS Wrap around and Regular expression ticked

        ACTION Click on the Replace All button


        Notes :

        • As usual, the (?-s) modifier means that the dot ( . ) matches a standard character, ONLY and NOT any *line-break character

        • Then the part ^.+ represents the longest range of characters of any line, but…

        • ONLY IF the condition, in the look-ahead, ( (?=\|.+\|$) ) is true. That is to say if it’s followed by two | symbols, with some characters between, ( \|.+\| ), which end each line ( $ )

        • Note that the | symbol have to be escaped as \|, to be interpreted as literal, as it’s a special regex character, too !

        • Due to the empty replacement zone, the selected range, of each line, is simply deleted

        Best Regards,

        guy038

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