Open source · pure Ruby · zero dependencies
picoglob — compile globs into Ruby Regexps
Bash-style globs (*, **,
?, [a-z],
{a,b}, extglobs) against arbitrary strings — not just files on disk.
Everything below is computed live by the gem on the server as you type.
Source & docs →
Compiled Regexp · 2/10 match
/\Aapp\/(?:(?!\.)[^\/]*\/)*[^\/]*\.rb\z/
Picoglob.to_regexp("app/**/*.rb")
-
✓
app/models/user.rb -
✓
app/controllers/relay/messages_controller.rb -
·
app/views/relay/chat/index.html.erb -
·
config/routes.rb -
·
lib/tasks/deploy.rake -
·
spec/models/user_spec.rb -
·
README.md -
·
vendor/gems/picoglob/lib/picoglob.rb -
·
log/production.log -
·
.github/workflows/ci.yml