2026/11/01

,

RegexLens: A Regex Document Searcher Filling the Void Left by Archivarius

Filling the Void Left by Archivarius

To save space, I’ve been managing my massive personal e-book library by converting PDF and EPUB documents into TXT files and indexing them with Archivarius 3000. While Archivarius 3000 is great for its fast, index-based searches and multi-format support, it has a fatal flaw: development has been abandoned, and it does not support Regular Expression (Regex) searches. Simple keyword searches just don't cut it when you're trying to accurately pinpoint specific phrasing patterns like 'slouched like a [something]'.

While looking for an alternative, I stumbled upon AnyTXT. It supports regex, but it's incredibly slow, and certain features like opening a 'new tab' are locked behind a paywall. So, following my recent trend of DIY solutions, I thought, "Why not just build one myself?" With the help of AI, I created RegexLens. True to its name, it’s a tool designed to let you peer through massive piles of documents through the lens of Regex.

If there’s one thing RegexLens excels at, it’s regex search speed—thanks to its AST regex parsing engine and multi-core support, it is dozens of times faster than AnyTXT. On the flip side, AnyTXT is still faster for standard, simple word searches. Therefore, I highly recommend this tool to heavy regex users!

RegexLens vs. AnyTXT Searcher

Comparison RegexLens AnyTXT Searcher Details & Notes
Regex Search Speed Very Fast (~15 sec) Very Slow (~274 sec) RegexLens uses AST regex parsing and 2-gram dictionary pre-filtering followed by multi-core parallel validation.
Standard Word Search Speed Average (~3-4 sec) Very Fast (~0.1 sec) AnyTXT uses C++ in-memory direct word mapping (RegexLens does real-time line number/snippet validation simultaneously).
Search Accuracy (Omissions) Excellent (2,325 hits) Some Omissions (2,066 hits) Confirmed 259 missed hits in AnyTXT due to encoding issues (CP949/UTF-8).
Index (DB) File Size Very Small (~13GB) Large (~27GB) RegexLens utilizes zlib/lzma text compression and a compact 2-character inverted index structure.
Executable Size & Resources Light (~20MB standalone exe) Heavy (~300MB) AnyTXT runs a background indexing daemon service constantly; RegexLens is a portable, standalone app.
Wildcard Search (?, *) Supported (Dedicated Option) Not Supported (No dedicated mode) RegexLens offers a dedicated wildcard checkbox (auto-converts to regex); AnyTXT requires manual regex workarounds which are extremely slow.

The indexing speed and DB file size tests were conducted by indexing roughly 60,000 identical documents in the same folder. For the regex speed comparison, I used the default bookmark example: beautiful\s+like\s+\S+ (meaning 'slouched like [something]'). Note that AnyTXT might have indexed slightly more files (a few dozen) since it supports a wider range of file extensions.

Pros and Cons

  • Native Regex Support: You can use standard Python re syntax directly. Complex patterns like line anchors (^ $), lookahead/lookbehind, and quantifiers are fully supported.
  • High-Speed Index-Based Search: It doesn't scan every document from scratch. It narrows down candidates using a 2-character inverted index before validating. Expressions containing fixed strings are incredibly fast.
  • Search Inside Archives: Texts inside ZIP, 7z, and RAR files are included in the index.
  • Parallel Processing: Both indexing and searching utilize multi-processing, automatically scaling worker counts based on your CPU cores. Indexing runs at a low priority so it doesn't bog down your PC.
  • Tabbed Interface: Search queries, options, results, and previews operate independently in each tab (a paid feature in AnyTXT). You can prepare multiple searches and run them sequentially.
  • Favorites & History: Save and name your frequently used regex patterns. It also remembers your last 40 search queries.
  • Ignores Full/Half-width Characters: Treats ABC and ABC, or 123 and 123 as identical. This is applied even at the index filtering stage.
  • Wildcard Search: If regex feels too overwhelming, you can simply use ? (one character) and * (multiple characters).
  • External Editor Integration: Double-click a search result to instantly open that exact line and column in editors like Notepad++, VS Code, or EmEditor.

  • No Direct PDF/EPUB Support: Text extraction is only supported for TXT, HTML, DOCX, and HWPX. PDF or EPUB files must be converted to TXT beforehand.
  • Initial Indexing Time: The larger the document pool, the longer the very first index takes. Afterward, it only performs fast incremental indexing on new or modified files.
  • GUI Desktop App: Optimized strictly for Windows desktop environments. Not suitable for command-line automation or server usage.

⬇ Download App (Updated: 2026/11/01)

RegexLens: Download via PikPak / Download via TeraBox


Bonus: Includes a companion HWP to HWPX converter tool.

🆕 Update History 🆕

  • v1.1.1 [Latest]
    • English UI support added
    • Deleted files can now be viewed from the index

How to Use

How to use RegexLens
  • Step 1 — Set Index Folder: Open Settings > Index · Settings (Ctrl+I) from the top menu and register your target folders using the [Add Folder...] button. You can also exclude specific subfolders by adding them to the 'Excluded Folders' list.
  • Step 2 — Run Indexing: In the same window, click either [Index New/Modified Files] or [Rebuild All]. Progress and logs will appear in the window. You can continue searching while indexing runs in the background.
  • Step 3 — Enter Search Query: Type your regex into the 'Search Query' field on the main window. For example, entering beautiful\s+like\s+\S+ will find patterns like 'slouched like a [blank]'. Any regex syntax errors will be flagged in real-time as you type.
  • Step 4 — Set Options & Search: Adjust checkboxes like 'Regex', 'Ignore Case', 'Ignore Full/Half-width', or 'Dot (.) matches newline' to fit your needs, then click [Search] or hit Enter.
  • Step 5 — Review Results: Select a file from the result list to see the exact match highlighted in the preview pane below. The 'Search Results' tab conveniently gathers only the matching lines for a quick overview.
  • Step 6 — Open Document: Double-clicking a result or pressing Enter will open the designated external editor directly to that specific line and column. If you use the default Windows program, the matched text is automatically copied to your clipboard.
  • Step 7 — Export Results: Press Ctrl+S to save the current tab's search results as a CSV file.

Detailed Option Guide

Detailed Option
  • Regex: When checked, the input is parsed as a Python regular expression. If unchecked, it performs a standard string search (intelligently treating spaces as spaces or newlines).
  • Ignore Case: Disregards English capitalization. Identical to the (?i) regex flag.
  • Ignore Full/Half-width: Converts full-width characters (A, 1) to half-width (A, 1) for comparison. It only uses 1:1 conversions that don't alter the character count, ensuring preview highlighting remains perfectly aligned.
  • Dot (.) matches newline: Allows the regex dot (.) character to match line breaks. Highly useful for finding patterns that span across multiple lines.
  • Standard Search: Space = Space/Newline: When regex is off, spaces in your search query are treated as one or more spaces or line breaks. This allows you to find continuous phrases even if they are split across paragraphs.
  • Search Within Current Results: Performs a secondary search targeting only the documents found in the previous search. Great for gradually narrowing down results.
  • Wildcard (? *): Only active when regex is disabled. ? stands for any single character (excluding space), and * stands for multiple characters (excluding space).
  • Include/Exclude Path/Filename: You can enter multiple keywords separated by semicolons (;). 'Include' passes the file if any keyword matches; 'Exclude' drops the file if any keyword matches. This speeds up the search by reducing the number of documents to scan.
  • Regex Engine (re / regex): Defaults to Python's built-in re module. If the regex package is installed, you can select it to utilize Unicode properties like \p{Hangul} and timeouts to prevent catastrophic backtracking.
  • Max Processes for Index/Search: Leaving it at 0 automatically sets it to match your CPU core count. Manually entering a number will spawn that many parallel processes. Be careful not to exceed your physical core count for indexing.
  • Run Indexing at Low Priority: Lowers the process priority so indexing doesn't cause stutters in your other programs.
  • Default Editor on Double-Click: Selecting 'Default App' opens the file in your standard Windows program (cannot jump to specific lines; matches are copied to the clipboard). Selecting Notepad++, VS Code, or EmEditor lets you use placeholders like {file}, {line}, and {col} to jump straight to the exact match.
  • Max File Size (MB): Files exceeding this size are skipped during indexing and searching. The default is 64MB.
  • Text Compression Method: Choose between zlib (fast), lzma (smaller size), or none when saving text to the index DB. Requires a 'Rebuild All' to take effect after changing.
  • Auto Backup: On the first run after an update, it creates a one-time backup of index.db as index.db.bak. It's simply a safety net, as the index format remains unchanged.

Who is this for?

  • Those who want precise document searches using regex: Anyone needing to extract specific patterns (dates, emails, specific sentence structures) from a mountain of documents that standard keywords can't handle.
  • Those who missed regex in Archivarius 3000: Anyone who wants to keep the indexing speed and convenience of Archivarius while adding the powerful weapon of regular expressions to their arsenal.
  • Those tired of AnyTXT's paywalls: Anyone wanting to run regex searches and search inside compressed archives entirely for free, directly on their local machine.
  • Heavy TXT document hoarders: Anyone who archives PDFs/EPUBs by converting them to TXT and needs to rapidly find specific text patterns within them.
  • Privacy-conscious users: Anyone who wants 100% of their indexing and searching done locally on their PC, without relying on cloud or external services.

Please keep in mind that this is an app built entirely with the help of AI by a complete novice who doesn't know the first thing about coding. Because of that, there might be rough edges and bugs here and there, so I ask for your generous understanding.

Lastly, while I can't make any hard promises, if you leave feedback regarding bugs or improvements, I'll do my absolute best to wring a solution out of the AI to get it fixed.

0 comments:

댓글 쓰기

본문이나 댓글을 정독하신 후 신중히 작성해주세요