--- id: rebulk version: "6.0.1" license: MIT license_treatment: permissive maintenance: active --- # rebulk — Rebulk - Define simple search patterns in bulk to perform advanced matching on any string. License: permissive · Maintenance: active · Downloads: 151.4K/mo ## What it is and what it does ReBulk is a Python library that simplifies complex string searching by providing a readable, chainable API for defining patterns. Instead of writing intricate regex or string manipulation code, you declare patterns using string(), regex(), functional(), and chain() methods on a Rebulk object, then call matches() to find all occurrences. When multiple patterns match at the same position, ReBulk keeps only the longest match, eliminating the need to manually resolve conflicts. The library is built for tasks where the standard re module or string methods become unwieldy—parsing structured text formats, extracting metadata from filenames, or validating complex patterns. It supports validators and formatters to filter or transform matches, pre- and post-processors to modify match objects, and chain patterns for ordered composition of multiple pattern types. With no external runtime dependencies and support for modern Python versions, it integrates cleanly into existing projects. Use it for: - Parse structured filenames or paths to extract metadata like episode numbers, versions, or quality indicators - Build a custom text parser for domain-specific formats (e.g., log entries, configuration files) without writing complex regex - Validate and extract multiple overlapping patterns from a single string, automatically choosing the longest match - Chain multiple pattern types together to match sequences (e.g., 'episode number followed by optional version followed by zero or more extra identifiers') - Apply custom validation logic to matched patterns using validator functions before accepting them as results ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. ReBulk provides a fluent API for building complex string pattern matchers using regex, string, and functional patterns, with automatic conflict resolution when multiple matches overlap. Yes. ReBulk is actively maintained, has no dependencies, supports current Python versions, carries an MIT license, and solves a real problem—making complex string matching readable and maintainable. Install it if you're building a text parser or pattern extractor where regex alone becomes hard to follow or maintain. ## Install pip install rebulk uv add rebulk poetry add rebulk ## Installing rebulk Before you install: Low friction install with no runtime dependencies. Actively maintained with a recent release; supports current Python versions (3.10 through 3.14). License in practice: MIT license permits unrestricted use, modification, and distribution in both open-source and proprietary projects. Quickstart: from rebulk import Rebulk bulk = Rebulk().string('brown').regex(r'qu\w+').functional(lambda s: (20, 25)) matches = bulk.matches("The quick brown fox jumps over the lazy dog") print(matches) # [, , ] Verify before relying: - Whether the optional regex module integration (REBULK_REGEX_ENABLED=1) provides material performance or feature benefits over the standard library re module - Real-world performance characteristics when matching against very large strings or with deeply nested chain patterns ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 151.4K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags advanced string pattern matching, regex alternative fluent api, complex string search library, pattern matching bulk operations, string matching with rules, regex wrapper readable api, overlapping match resolution, pattern-matching, string-parsing, fluent-api [View on SkillFed](https://skillfed.io/packages/rebulk) · [View on PyPI](https://pypi.org/project/rebulk/)