Feature Request: RegExp search

My identity protection service (Identity Guard) displays the entire username, but masks all but the first two and last character of any username/password combo of mine found on the dark web. Sometimes it’s easy to find the culprit; most often: it’s not and I have to export my database to find the offending site among all the passwords that start with those two characters. My pleas to them to stop masking within their allegedly secure mailbox have gone unanswered over the couple of years in which I started popping up in the dark, so I turn to you, my receptive friends!

If Codebook had the ability to use RegExp or, at least, wildcards, to search, I wouldn’t need to expose my database in a clear text CSV file. Maybe activated via a “Use RegExp” checkbox under the search box, or by prefixing the search term(s) with a keyword such as “RegExp:”.

Thanks for listening! Now, off to export a CSV to find and change the most recent nebulous dark web discovery…

EDIT: I use iOS, Android, and Windows versions, if that makes any difference (predominantly iOS and Windows)

Hi @pbabcock

Thanks for using Codebook and posting to the discussion forum with this feature request. Including RegExp search as an advanced search feature is an interesting idea. I believe we’ve had a request or two for it in the past and have discussed potential use cases for it (like yours). I’ll bring up the request with the rest of the team and add it to our internal feature tracking system for consideration in the future.

That being said, I’d like to provide you with a potential alternate option for your specific use case which would alleviate the need to export your Codebook database to a CSV and manually search through it. Your Codebook database is encrypted using SQLCipher, there’s a popular third party tool called DB Browser for SQLite which has support for opening SQLCipher databases. You could open your encrypted Codebook database using this tool and manually run a query to get the name of the Entry. Here are the steps to do that:

  1. Download and install DB Browser for SQLite: Downloads - DB Browser for SQLite (make sure to use the executable with (SQLCipher) in its title).

  2. Open File Explorer and enter this location in the address bar: %APPDATA%\Zetetic LLC\Strip within that location is a strip.db file, this is your encrypted Codebook database, right click on it and choose “Open with DB Browser for SQLite” You will be prompted for a password, enter your Codebook Master Password.

  3. Navigate to the Execute SQL tab, and paste this query in the editor pane top text box:

    SELECT name FROM entries WHERE id IN (SELECT entry_id FROM fields WHERE lower(value) LIKE ‘3f%d5’);

    Replace 3f with the lowercase version of the first two letters and d5 with the lowercased ending two letters you’re searching for. Then click the Run button (looks like a play button).

  4. This will output the name of the Entry with any fields which match.

Note: Do not use DB Browser for SQLite to make any manual modifications to Codebook data within the encrypted database. Codebook’s sync tracking system won’t capture the change for sync if it’s made outside of the Codebook interface.

Very cool! I already use DB Browser, so I am familiar with it. I’ll pull down the SQLCipher variant and give it a go.

Thanks.