
Security News
GitHub Actions Pricing Whiplash: Self-Hosted Actions Billing Change Postponed
GitHub postponed a new billing model for self-hosted Actions after developer pushback, but moved forward with hosted runner price cuts on January 1.
rector
Advanced tools
Rector turns example strings into optimized regular expressions you can reuse in search, validation, or routing rules. It ships with a trie-based engine that produces compact, deterministic patterns (also used by the CLI).
pip install rector
from rector import TrieRegexGenerator
# Build a minimal trie-based pattern for larger sets or ranges
numbers = (
TrieRegexGenerator()
.add_examples([str(n) for n in range(10, 1000)])
.generate()
)
assert numbers.pattern == "^[1-9][0-9]{1,2}$"
# Generate from small fixed-length samples
words = TrieRegexGenerator().add_examples(["cat", "car", "cap"]).generate()
assert words.pattern == r"^ca[prt]$"
Pipe examples to rector and it prints the generated pattern to stdout:
printf "cat\ncar\ncap\n" | rector
# -> ^ca[prt]$
The CLI anchors patterns by default and exits with status 1 if no stdin input is provided.
Use --dense-threshold to adjust when near-contiguous character sets are collapsed into ranges
(accepts fractions.Fraction strings like 3/4 or 0.6; default when flag is present without a value:
8/10).
anchor_start=False or anchor_end=False.TrieRegexGenerator raises TypeError otherwise.TrieRegexGenerator builds a trie, minimizes it, and compacts ranges/quantifiers (using the density threshold for near-contiguous classes); it also accepts empty lines as valid examples.FAQs
Regex generator that derives optimized patterns from example strings.
We found that rector demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
GitHub postponed a new billing model for self-hosted Actions after developer pushback, but moved forward with hosted runner price cuts on January 1.

Research
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.