Project

regexes

0.0
The project is in a healthy, maintained state
Regexes is a library of frozen Regexp objects named for what they match (letters, digits, UUIDs, ISO 8601 times, domain names, email addresses), each chaining the variations every expression allows: anchored, repeated, case-insensitive, and for sets of characters, excluded and extended. No dependencies.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies
 Project Readme

regexes

Gem Version CI Release License Ruby

The regex you need, already written. Patterns named for what they match — UUIDs, IP addresses, ISO 8601 times, IBANs — each a frozen Regexp that chains anchors, repetition and captures, tested against Ruby's own parsers, and runs the same in JavaScript. No dependencies.

log = 'Retry 10.0.0.1, not 1.2.3.456'

log.scan(/\d{1,3}(?:\.\d{1,3}){3}/)   # => ["10.0.0.1", "1.2.3.456"]
log.scan(Regexes.ipv4_address)         # => ["10.0.0.1"]

"ok\nevil".match?(/^[a-z]+$/)                                  # => true: ^ and $ are line anchors in Ruby
Regexes.lowercase_letters.one_or_more.whole.match?("ok\nevil")  # => false

Regexes.semantic_version.match('2.1.3-rc.1+sha.5114f85')[:prerelease]  # => "rc.1"

Documentation: https://sebscholl-labs.github.io/regexes/ · Install and use: gem/README.md

Repository layout

Directory Purpose README
gem/ The published gem source: lib/, test/, gemspec, CHANGELOG.md. Everything that ends up on RubyGems lives here. gem/README.md
site/ The VitePress documentation site published to https://sebscholl-labs.github.io/regexes/. site/

Working in this repo

Each package is independent and uses its own dependencies.

# work on the gem
cd gem
bundle install
bundle exec rake          # full test + lint suite

# work on the docs site
cd site
npm install
npm run dev               # local VitePress server

CI

Three GitHub workflows live in .github/workflows/:

Workflow Triggers What it does
ci.yml push to main, every PR Runs the gem's Minitest suite on Ruby 4.0, the RuboCop quality job, and builds the docs site
release.yml a published GitHub Release Re-runs the gem suite on the tagged commit, then publishes the gem to RubyGems.org via OIDC trusted publishing
docs.yml push to main Builds the VitePress site from site/ and deploys it to GitHub Pages

Contributing

  • Bug or feature in the gem → PR against gem/. Tests live in gem/test/ (Minitest). bundle exec rake runs them plus RuboCop.
  • Documentation site → PR against site/. The build is npm run build.

License

MIT.