Galtzo FLOSS Logo by Aboling0, CC BY-SA 4.0 ruby-lang Logo, Yukihiro Matsumoto, Ruby Visual Identity Team, CC BY-SA 2.5

🍲 Gitmoji::Regex

Version GitHub tag (latest SemVer) License: MIT Downloads Rank CodeCov Test Coverage Coveralls Test Coverage QLTY Test Coverage QLTY Maintainability CI Heads CI Runtime Dependencies @ HEAD CI Current CI Truffle Ruby CI JRuby Deps Locked Deps Unlocked CI Test Coverage CI Style CodeQL Apache SkyWalking Eyes License Compatibility Check

if ci_badges.map(&:color).detect { it != "green"} ☝️ let me know, as I may have missed the discord notification.


if ci_badges.map(&:color).all? { it == "green"} πŸ‘‡οΈ send money so I can do more of this. FLOSS maintenance is now my full-time job.

Sponsor Me on Github Liberapay Goal Progress Donate on PayPal Buy me a coffee Donate on Polar Donate at ko-fi.com

πŸ‘£ How will this project approach the September 2025 hostile takeover of RubyGems? πŸš‘οΈ I've summarized my thoughts in [this blog post](https://dev.to/galtzo/hostile-takeover-of-rubygems-my-thoughts-5hlo).

🌻 Synopsis

This gem provides a regex that allows Ruby code to test a string for a Gitmoji character. Gitmoji is a subset of the Unicode Emoji character set. This gem is not a fork of, but was inspired by, the wonderful emoji_regex gem.

You can use this regular expression to validate commit messages or extract leading gitmoji from strings.

# character at position 0 is a Gitmoji!
"πŸ”₯" =~ Gitmoji::Regex::REGEX # => 0

# (0 is the index of the match, so it means valid!)
(Gitmoji::Regex::REGEX =~ "✨ Add feature").zero? #=> true

# Scan for Gitmoji
"✨ Fix bug πŸ›".scan(Gitmoji::Regex::REGEX) #=> ["✨", "πŸ›"]
🚚 Amazing test matrix was brought to you by πŸ”Ž appraisal2 πŸ”Ž
πŸ‘Ÿ Check it out! ✨ github.com/appraisal-rb/appraisal2 ✨

πŸ’‘ Info you can shake a stick at

Tokens to Remember Gem name Gem namespace
Works with JRuby JRuby 9.2 Compat JRuby 9.3 Compat
JRuby 9.4 Compat JRuby current Compat JRuby HEAD Compat
Works with Truffle Ruby Truffle Ruby 22.3 Compat Truffle Ruby 23.0 Compat Truffle Ruby 23.1 Compat
Truffle Ruby 24.2 Compat Truffle Ruby 25.0 Compat Truffle Ruby current Compat
Works with MRI Ruby 4 Ruby 4.0 Compat Ruby current Compat Ruby HEAD Compat
Works with MRI Ruby 3 Ruby 3.0 Compat Ruby 3.1 Compat Ruby 3.2 Compat Ruby 3.3 Compat Ruby 3.4 Compat
Works with MRI Ruby 2 Ruby 2.4 Compat Ruby 2.5 Compat Ruby 2.6 Compat Ruby 2.7 Compat
Support & Community Join Me on Daily.dev's RubyFriends Live Chat on Discord Get help from me on Upwork Get help from me on Codementor
Source Source on GitLab.com Source on CodeBerg.org Source on Github.com The best SHA: dQw4w9WgXcQ!
Documentation Current release on RubyDoc.info YARD on Galtzo.com Maintainer Blog GitLab Wiki GitHub Wiki
Compliance License: MIT Apache license compatibility: Category A πŸ“„ilo-declaration-img Security Policy Contributor Covenant 2.1 SemVer 2.0.0
Style Enforced Code Style Linter Keep-A-Changelog 1.0.0 Gitmoji Commits Compatibility appraised by: appraisal2
Maintainer πŸŽ–οΈ Follow Me on LinkedIn Follow Me on Ruby.Social Follow Me on Bluesky Contact Maintainer My technical writing
... πŸ’– Find Me on WellFound: Find Me on CrunchBase My LinkTree More About Me 🧊 πŸ™ πŸ›– πŸ§ͺ

Compatibility

Compatible with MRI Ruby 2.4+, and concordant releases of JRuby, and TruffleRuby. CI workflows and Appraisals are generated for MRI Ruby 2.4+. This test floor is configured by ruby.test_minimum in .kettle-jem.yml and may be higher than the gem's runtime compatibility floor when legacy Rubies are not practical for the current toolchain.

🚚 Amazing test matrix was brought to you by πŸ”Ž appraisal2 πŸ”Ž and the color πŸ’š green πŸ’š
πŸ‘Ÿ Check it out! ✨ github.com/appraisal-rb/appraisal2 ✨

✨ Installation

Install the gem and add to the application's Gemfile by executing:

bundle add gitmoji-regex

If bundler is not being used to manage dependencies, install the gem by executing:

gem install gitmoji-regex

βš™οΈ Configuration

Not needed.

πŸ”§ Basic Usage

πŸ” Security

See SECURITY.md.

🀝 Contributing

If you need some ideas of where to help, you could work on adding more code coverage, or if it is already πŸ’― (see below) check issues or PRs, or use the gem and think about how it could be better.

We Keep A Changelog so if you make changes, remember to update it.

See CONTRIBUTING.md for more detailed instructions.

πŸ“Œ Versioning

This library follows Semantic Versioning 2.0.0 for its public API where practical. For most applications, prefer the Pessimistic Version Constraint with two digits of precision.

For example:

spec.add_dependency("gitmoji-regex", "~> 1.0")
πŸ“Œ Is "Platform Support" part of the public API? More details inside. Dropping support for a platform can be a breaking change for affected users. If a release changes supported platforms, it should be called out clearly in the changelog and versioned with that impact in mind. To get a better understanding of how SemVer is intended to work over a project's lifetime, read this article from the creator of SemVer: - ["Major Version Numbers are Not Sacred"][πŸ“Œmajor-versions-not-sacred]

See CHANGELOG.md for a list of releases.

πŸ“„ License

The gem is available as open source under the terms of the MIT License: MIT.

Field Value
Package gitmoji-regex
Description 🍲 A regular expression matching Gitmoji (a subset of Unicode Emoji) symbolsFund overlooked open source projects - bottom of stack, dev/test dependencies: floss-funding.dev
Homepage https://github.com/galtzo-floss/gitmoji-regex
Source https://github.com/galtzo-floss/gitmoji-regex/tree/v1.0.3
License MIT
Funding https://github.com/sponsors/pboling, https://issuehunt.io/u/pboling, https://ko-fi.com/pboling, https://liberapay.com/pboling/donate, https://patreon.com/galtzo, https://polar.sh/pboling, https://thanks.dev/u/gh/pboling, https://tidelift.com/funding/github/rubygems/gitmoji-regex, https://www.buymeacoffee.com/pboling