Module: Gitmoji::Regex
- Defined in:
- lib/gitmoji/regex.rb,
lib/gitmoji/regex/version.rb,
lib/gitmoji/regex/reference.rb
Overview
Namespace for the regex and maintenance tools provided by this gem.
Defined Under Namespace
Modules: Version Classes: Reference
Constant Summary collapse
- REGEX =
Regular expression that matches any official Gitmoji emoji.
You can use this to validate commit messages or extract leading gitmoji from strings.
Examples:
# Validate a commit title starts with a gitmoji (Gitmoji::Regex::REGEX =~ "โจ Add feature") #=> 0 # Extract all gitmojis from text "โจ Fix bug ๐".scan(Gitmoji::Regex::REGEX) #=> ["โจ", "๐"] Regexp.new("(?-mix:๐จ|โก๏ธ|๐ฅ|๐|๐๏ธ|โจ|๐|๐|๐|๐|โ |๐๏ธ|๐|๐|๐จ|๐ง|๐|โฌ๏ธ|โฌ๏ธ|๐|๐ท|๐|โป๏ธ|โ|โ|๐ง|๐จ|๐|โ๏ธ|๐ฉ|โช๏ธ|๐|๐ฆ๏ธ|๐ฝ๏ธ|๐|๐|๐ฅ|๐ฑ|โฟ๏ธ|๐ก|๐ป|๐ฌ|๐๏ธ|๐|๐|๐ฅ|๐ธ|๐๏ธ|๐ฑ|๐คก|๐ฅ|๐|๐ธ|โ๏ธ|๐๏ธ|๐ท๏ธ|๐ฑ|๐ฉ|๐ฅ |๐ซ|๐๏ธ|๐|๐ฉน|๐ง|โฐ๏ธ|๐งช|๐|๐ฉบ|๐งฑ|๐งโ๐ป|๐ธ|๐งต|๐ฆบ|โ๏ธ|๐ฆ)")
- VERSION =
Traditional Constant Location
Version::VERSION