All Projects → mingrammer → Commonregex

mingrammer / Commonregex

Licence: mit
🍫 A collection of common regular expressions for Go

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Commonregex

globrex
Glob to regular expression with support for extended globs.
Stars: ✭ 52 (-92.91%)
Mutual labels:  pattern, regex, regexp, regular-expression
Regaxor
A regular expression fuzzer.
Stars: ✭ 35 (-95.23%)
Mutual labels:  regex, regexp, regular-expression
moar
Deterministic Regular Expressions with Backreferences
Stars: ✭ 19 (-97.41%)
Mutual labels:  regex, regexp, regular-expression
Picomatch
Blazing fast and accurate glob matcher written JavaScript, with no dependencies and full support for standard and extended Bash glob features, including braces, extglobs, POSIX brackets, and regular expressions.
Stars: ✭ 393 (-46.38%)
Mutual labels:  regex, regular-expression, regexp
Rex
Your RegEx companion.
Stars: ✭ 283 (-61.39%)
Mutual labels:  regex, regular-expression, regexp
Regexpu
A source code transpiler that enables the use of ES2015 Unicode regular expressions in ES5.
Stars: ✭ 201 (-72.58%)
Mutual labels:  regex, regular-expression, regexp
extglob
Extended globs. Add (almost) the expressive power of regular expressions to glob patterns.
Stars: ✭ 25 (-96.59%)
Mutual labels:  pattern, regex, regular-expression
Globbing
Introduction to "globbing" or glob matching, a programming concept that allows "filepath expansion" and matching using wildcards.
Stars: ✭ 86 (-88.27%)
Mutual labels:  regex, regular-expression, pattern
Regulex
🚧 Regular Expression Excited!
Stars: ✭ 4,877 (+565.35%)
Mutual labels:  regex, regular-expression, regexp
expand-brackets
Expand POSIX bracket expressions (character classes) in glob patterns.
Stars: ✭ 26 (-96.45%)
Mutual labels:  regex, regexp, regular-expression
Grex
A command-line tool and library for generating regular expressions from user-provided test cases
Stars: ✭ 4,847 (+561.26%)
Mutual labels:  regex, regular-expression, regexp
Onigmo
Onigmo is a regular expressions library forked from Oniguruma.
Stars: ✭ 536 (-26.88%)
Mutual labels:  regex, regular-expression, regexp
Regex Dos
👮 👊 RegEx Denial of Service (ReDos) Scanner
Stars: ✭ 143 (-80.49%)
Mutual labels:  regex, regular-expression, regexp
Regex For Regular Folk
🔍💪 Regular Expressions for Regular Folk — A visual, example-based introduction to RegEx [BETA]
Stars: ✭ 242 (-66.98%)
Mutual labels:  regex, regular-expression, regexp
Orchestra
One language to be RegExp's Successor. Visually readable and rich, technically safe and extended, naturally scalable, advanced, and optimized
Stars: ✭ 103 (-85.95%)
Mutual labels:  regex, regular-expression, regexp
cregex
A small implementation of regular expression matching engine in C
Stars: ✭ 72 (-90.18%)
Mutual labels:  regex, regexp, regular-expression
Emoji Regex
A regular expression to match all Emoji-only symbols as per the Unicode Standard.
Stars: ✭ 1,134 (+54.71%)
Mutual labels:  regex, regular-expression, regexp
Hyperscan Java
Match tens of thousands of regular expressions within milliseconds - Java bindings for Intel's hyperscan 5
Stars: ✭ 66 (-91%)
Mutual labels:  regex, regular-expression, regexp
regexp-expand
Show the ELisp regular expression at point in rx form.
Stars: ✭ 18 (-97.54%)
Mutual labels:  regex, regexp, regular-expression
RgxGen
Regex: generate matching and non matching strings based on regex pattern.
Stars: ✭ 45 (-93.86%)
Mutual labels:  regex, regexp, regular-expression



CommonRegex

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]']
}

Features

  • Date
  • Time
  • Phone
  • Phones with exts
  • Link
  • Email
  • IPv4
  • IPv6
  • IP
  • Ports without well-known (not known ports)
  • Price
  • Hex color
  • Credit card
  • VISA credit card
  • MC credit card
  • ISBN 10/13
  • BTC address
  • Street address
  • Zip code
  • Po box
  • SSN
  • MD5
  • SHA1
  • SHA256
  • GUID
  • MAC address
  • IBAN
  • Git Repository

Thanks to ❤️

License

FOSSA Status

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].