re2

Fast regular expression library supporting PCRE-style patterns

brewmacoslinux
Try with needOr install directly
Source

About

Alternative to backtracking PCRE-style regular expression engines

Commands

re2

Examples

Test if a string matches a regular expression pattern$ echo 'hello world' | re2 'h.*d'
Extract matching groups from text using capture groups$ echo 'user@example.com' | re2 '([a-z]+)@([a-z.]+)'
Perform case-insensitive pattern matching$ echo 'HELLO' | re2 '(?i)hello'