Lightweight Portable Search-and-Replace: A Regular Expression Wizard
What it is
A small, portable utility that performs search-and-replace across files using regular expressions (regex). Runs without installation (from a USB drive or single executable), supports batch processing, previewing changes, and common text encodings.
Key features
- Portable: Single executable or portable package — no installer, no registry changes.
- Regex-powered: Full regular expression support (lookahead/lookbehind, groups, captures, backreferences).
- Batch processing: Apply replacements across multiple files and folders with include/exclude patterns.
- Preview & undo: Live preview of matches and proposed replacements; undo or create backups before applying.
- Encoding support: UTF-8, UTF-16 (LE/BE), ASCII, and common code pages.
- File types: Plain text, source code, logs; optional binary-safe mode for simple byte-level replacements.
- Performance: Streaming file processing and multi-threading for large sets of files.
- Safety controls: Dry-run mode, backup creation, size limits, and change summaries.
- Search scopes: Current folder, subfolders, selected files, or whole-drive search with filters.
- Replace options: Whole-match replacement, group-based templates, case-preserving replacements, and interactive replace per occurrence.
- Integration: Command-line interface for scripting and automation, optional GUI for interactive use.
- Cross-platform builds: Native or portable builds for Windows, macOS, and Linux (where available).
Who it’s for
- Developers refactoring code
- DevOps and sysadmins editing configuration or log files
- Writers and editors doing bulk text fixes
- QA engineers preparing test fixtures
- Anyone needing quick, repeatable multi-file text transformations without installing software
Typical workflow
- Launch the portable executable.
- Select target folder(s) and file filters (*.txt,.py, *.conf).
- Enter regex search pattern and replacement template.
- Run a preview to review detected matches.
- Optionally create backups, then apply replacements or export a patch report.
Safety tips
- Always run a preview and use backups for critical files.
- Test regex on a sample subset first.
- Use dry-run when performing wide-ranging replacements.
Alternatives
- Command-line: sed, perl, ripgrep + rga, or awk for scripted workflows.
- GUI: Notepad++ Replace in Files, Sublime Text “Find in Files”, VS Code with regex search/replace.
If you want, I can draft a short user guide, sample regex recipes, or a minimal CLI usage reference for this tool.
Leave a Reply