https://github.com/ticky/ruby-emoji-regex
💎 A set of Ruby regular expressions for matching Unicode Emoji symbols.
https://github.com/ticky/ruby-emoji-regex
Keywords
emoji regex regexp regular-expression unicode
Last synced: about 7 hours ago
JSON representation
Repository metadata
💎 A set of Ruby regular expressions for matching Unicode Emoji symbols.
- Host: GitHub
- URL: https://github.com/ticky/ruby-emoji-regex
- Owner: ticky
- License: mit
- Created: 2017-07-05T04:45:51.000Z (over 8 years ago)
- Default Branch: develop
- Last Pushed: 2026-01-13T06:28:25.000Z (about 2 months ago)
- Last Synced: 2026-01-23T21:40:17.662Z (about 1 month ago)
- Topics: emoji, regex, regexp, regular-expression, unicode
- Language: Ruby
- Homepage:
- Size: 171 KB
- Stars: 41
- Watchers: 2
- Forks: 3
- Open Issues: 8
- Releases: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
README.md
Ruby Emoji Regex 💎
A Ruby regular expression for matching Unicode Emoji symbols.
Background
This is based upon the fantastic work from Mathias Bynens' emoji-test-regex-pattern package. emoji-test-regex-pattern is cleverly assembled based upon data from the Unicode Consortium.
The regular expressions provided herein are derived from that package.
Installation
gem install emoji_regex
Usage
emoji_regex provides the EmojiRegex::Regex regular expression, which matches emoji, as defined by the Unicode standard's emoji-test data file.
Example
require 'emoji_regex'
text = <<TEXT
\u{231A}: ⌚ default Emoji presentation character (Emoji_Presentation)
\u{2194}\u{FE0F}: ↔️ default text presentation character with Emoji variation selector
\u{1F469}: 👩 Emoji modifier base (Emoji_Modifier_Base)
\u{1F469}\u{1F3FF}: 👩🏿 Emoji modifier base followed by a modifier
TEXT
text.scan EmojiRegex::Regex do |emoji|
puts "Matched sequence #{emoji} — code points: #{emoji.length}"
end
Console output:
Matched sequence ⌚ — code points: 1
Matched sequence ⌚ — code points: 1
Matched sequence ↔️ — code points: 2
Matched sequence ↔️ — code points: 2
Matched sequence 👩 — code points: 1
Matched sequence 👩 — code points: 1
Matched sequence 👩🏿 — code points: 2
Matched sequence 👩🏿 — code points: 2
Note: The above code and output are verified as part of the spec suite.
Development
Requirements
Initial setup
To install all the Ruby and Javascript dependencies, you can run:
bin/setup
To update the Ruby source files based on the emoji-regex library:
bundle exec rake regenerate
Specs
A spec suite is provided, which can be run as:
bundle exec rake spec
Versioning Policy
Since Version 14.0.0, Ruby Emoji Regex's versions have followed that of the Unicode standard itself.
Ruby Emoji Regex is based upon the emoji-test-regex-pattern package.
- If a patch revision of
emoji-test-regex-patternis released, and if its changes affect the Ruby port meaningfully, a version will be released with the same or greater patch version. - If a change is required to correct a bug specific to the Ruby port, the patch number will be incremented.
Ruby Compatibility Policy
While Ruby Emoji Regex uses features which should function on any Ruby version, it is explicitly intended to work on MRI Ruby versions which are currently within normal maintenance according to the Ruby team.
Creating a release
- Update the version in emoji_regex.gemspec
rake release
Owner metadata
- Name: Jessica Stokes
- Login: ticky
- Email:
- Kind: user
- Description: Cute queer cybersorceress. Rad software maker. Aspiring nomad.
- Website:
- Location:
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/282113?u=bbf66852ba22d795f819b1dd96d05029dfc03840&v=4
- Repositories: 173
- Last ynced at: 2024-04-14T07:08:18.875Z
- Profile URL: https://github.com/ticky
GitHub Events
Total
- Delete event: 3
- Pull request event: 5
- Watch event: 2
- Push event: 14
- Create event: 2
Last Year
- Delete event: 2
- Pull request event: 3
- Watch event: 2
- Push event: 9
- Create event: 1
Committers metadata
Last synced: 3 days ago
Total Commits: 123
Total Committers: 5
Avg Commits per committer: 24.6
Development Distribution Score (DDS): 0.35
Commits in past year: 0
Committers in past year: 0
Avg Commits per committer in past year: 0.0
Development Distribution Score (DDS) in past year: 0.0
| Name | Commits | |
|---|---|---|
| Jessica Stokes | h****o@j****t | 80 |
| Renovate Bot | b****t@r****m | 30 |
| renovate[bot] | 2****] | 6 |
| Tim Lucas | t@t****m | 6 |
| rhymes | r****s@h****m | 1 |
Committer domains:
- hey.com: 1
- toolmantim.com: 1
- renovateapp.com: 1
- jessicastokes.net: 1
Issue and Pull Request metadata
Last synced: 9 days ago
Total issues: 6
Total pull requests: 67
Average time to close issues: 11 months
Average time to close pull requests: 2 months
Total issue authors: 5
Total pull request authors: 6
Average comments per issue: 1.67
Average comments per pull request: 0.34
Merged pull request: 42
Bot issues: 1
Bot pull requests: 60
Past year issues: 0
Past year pull requests: 7
Past year average time to close issues: N/A
Past year average time to close pull requests: 2 months
Past year issue authors: 0
Past year pull request authors: 1
Past year average comments per issue: 0
Past year average comments per pull request: 0.0
Past year merged pull request: 0
Past year bot issues: 0
Past year bot pull requests: 7
Top Issue Authors
- ticky (2)
- spaghetticode (1)
- pboling (1)
- zw963 (1)
- renovate[bot] (1)
Top Pull Request Authors
- renovate[bot] (60)
- ticky (3)
- rhymes (1)
- yoyostile (1)
- toolmantim (1)
- benpickles (1)
Top Issue Labels
- help wanted (1)
Top Pull Request Labels
Package metadata
- Total packages: 2
-
Total downloads:
- rubygems: 238,619,494 total
- Total docker downloads: 84,875,638
- Total dependent packages: 9 (may contain duplicates)
- Total dependent repositories: 19,898 (may contain duplicates)
- Total versions: 26
- Total maintainers: 1
gem.coop: emoji_regex
A set of Ruby regular expressions for matching Unicode Emoji symbols.
- Homepage: https://github.com/ticky/ruby-emoji-regex
- Documentation: http://www.rubydoc.info/gems/emoji_regex/
- Licenses: MIT
- Latest release: 15.0.0 (published almost 3 years ago)
- Last Synced: 2026-03-01T10:34:38.760Z (2 days ago)
- Versions: 13
- Dependent Packages: 0
- Dependent Repositories: 0
- Downloads: 119,327,969 Total
- Docker Downloads: 42,437,819
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 0.215%
- Downloads: 0.225%
- Docker downloads count: 0.634%
- Maintainers (1)
rubygems.org: emoji_regex
A set of Ruby regular expressions for matching Unicode Emoji symbols.
- Homepage: https://github.com/ticky/ruby-emoji-regex
- Documentation: http://www.rubydoc.info/gems/emoji_regex/
- Licenses: MIT
- Latest release: 15.0.0 (published almost 3 years ago)
- Last Synced: 2026-02-27T23:01:10.111Z (3 days ago)
- Versions: 13
- Dependent Packages: 9
- Dependent Repositories: 19,898
- Downloads: 119,291,525 Total
- Docker Downloads: 42,437,819
-
Rankings:
- Downloads: 0.244%
- Dependent repos count: 0.255%
- Docker downloads count: 0.774%
- Dependent packages count: 2.044%
- Average: 4.48%
- Stargazers count: 8.492%
- Forks count: 15.072%
- Maintainers (1)
Dependencies
- emoji-test-regex-pattern 1.7.1 development
- emoji-test-regex-pattern 1.7.1
- rake = 13.0.6
- rspec = 3.11.0
- diff-lcs 1.5.0
- emoji_regex 14.0.0.pre.1
- rake 13.0.6
- rspec 3.11.0
- rspec-core 3.11.0
- rspec-expectations 3.11.0
- rspec-mocks 3.11.0
- rspec-support 3.11.0
- actions/checkout v3 composite
- actions/setup-node v3 composite
- ruby/setup-ruby v1 composite
Score: 25.09601735881485