As an open-source project, mingrammer/commonregex has picked up 893 stars on GitHub (Go). 🍫 A collection of common regular expressions for Go
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
A collection of often used regular expressions for Go
Inspired by CommonRegex
This is a collection of often used regular expressions. It provides these as simple functions for getting the matched strings corresponding to specific patterns.
Installation
go get github.com/mingrammer/commonregex
Usage
import (
cregex "github.com/mingrammer/commonregex"
)
func main() {
text := `John, please get that article on www.linkedin.com to me by 5:00PM on Jan 9th 2012. 4:00 would be ideal, actually. If you have any questions, You can reach me at (519)-236-2723x341 or get in touch with my associate at [email protected]`
dateList := cregex.Date(text)
// ['Jan 9th 2012']
timeList := cregex.Time(text)
// ['5:00PM', '4:00']
linkList := cregex.Links(text)
// ['www.linkedin.com', '[email protected]']
phoneList := cregex.PhonesWithExts(text)
// ['(519)-236-2723x341']
emailList := cregex.Emails(text)
// ['[email protected]']
}
Yes — mingrammer/commonregex ships under the MIT license, which makes its source code freely readable (and, depending on license terms, forkable and reusable). Source: github.com/mingrammer/commonregex.
What is mingrammer/commonregex?
mingrammer/commonregex (mingrammer/commonregex) is a Go project on GitHub. From the project's own README: 🍫 A collection of common regular expressions for Go
Where do I read more about mingrammer/commonregex?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/mingrammer/commonregex is the definitive source.
Read full README in the tab above.
Is commonregex worth your time?
ChatGPT, Claude and Perplexity can all read this page. Ask one of them what it makes of commonregex.