{"id":21867,"library":"rebulk","title":"Rebulk","description":"Rebulk is a Python library for defining simple search patterns in bulk and performing advanced matching on any string. It provides a clean API for building complex matchers with regular expressions, functional patterns, and chain filtering. Current version is 3.3.0, released in December 2023, with irregular release cadence.","status":"active","version":"3.3.0","language":"python","source_language":"en","source_url":"https://github.com/Toilal/rebulk/","tags":["string-matching","regex","pattern-matching","bulk-search"],"install":[{"cmd":"pip install rebulk","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"","wrong":"","symbol":"Rebulk","correct":"from rebulk import Rebulk"}],"quickstart":{"code":"from rebulk import Rebulk, Match\n\nrebulk = Rebulk()\nrebulk.string('hello')\nrebulk.regex(r'world')\nmatches = rebulk.matches('hello world')\nfor m in matches:\n    print(m.value, m.span)","lang":"python","description":"Create a Rebulk matcher, add string and regex patterns, and match against input."},"warnings":[{"fix":"Set environment variable: import os; os.environ['REBULK_REGEX_ENABLED'] = '1'","message":"Regex support is disabled by default since v3.0.0. To enable regex matching, set REBULK_REGEX_ENABLED=1 environment variable before importing rebulk.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Use Python 3.7 or later (Python 3.12 supported in v3.3.0).","message":"Python 2.7 and 3.4 support dropped in v3.0.0; Python 3.5 dropped in v3.1.0; Python 3.6 dropped in v3.2.0.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Understand pattern evaluation order: first added pattern wins in case of conflict unless priority is set.","message":"Patterns are evaluated in order, and later patterns can override earlier ones if they match same position. Use `exclude` or `priority` to control behavior.","severity":"gotcha","affected_versions":"all"},{"fix":"Use REBULK_REGEX_ENABLED instead of REGEX_DISABLED.","message":"The REGEX_DISABLED environment variable was replaced by REBULK_REGEX_ENABLED in v3.0.0. Old variable is ignored.","severity":"deprecated","affected_versions":">=3.0.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Use: from rebulk import Match","cause":"Imported Match from rebulk module incorrectly (e.g., import rebulk; rebulk.Match).","error":"AttributeError: module 'rebulk' has no attribute 'Match'"},{"fix":"Set os.environ['REBULK_REGEX_ENABLED'] = '1' before importing rebulk.","cause":"Regex is disabled by default in Rebulk versions >=3.0.0.","error":"Regex pattern '...' not matching even though regex module is installed."},{"fix":"Use string, compiled regex, or callable for patterns.","cause":"Using an unsupported pattern type (e.g., tuple without proper indicator).","error":"rebulk.exceptions.PatternError: Unsupported pattern type"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}