1 unstable release
0.1.0 | May 11, 2019 |
---|
#23 in #phone-number
11KB
83 lines
commonregex-rs
🔎 Find common expressions in a string
Table of Contents generated with DocToc
Usage
extern crate commonregex_rs;
use commonregex_rs::commonregex;
let logs = String::from("
Started GET '/' for 127.0.0.1 at 2019-05-11 00:51:35
Started GET '/' for 10.10.0.1 at 2019-05-11 00:52:05
");
let filtered_ips = commonregex::ip::v4(&logs);
// #=> vec!["127.0.0.1", "10.10.0.1"]
Features
Internet
commonregex::internet::email(&text)
URL
commonregex::internet::url(&text)
IP Addresses
IPv4
commonregex::ip::v4(&text)
IPv6
commonregex::ip::v6(&text)
Phone numbers
French phone numbers
commonregex::phone::fr(&text)
US phone numbers
commonregex::phone::us(&text)
Documentation
Full documentation available via
$> cargo doc --open
Notes
This project was inspired by commonregex
Dependencies
~2.2–3MB
~55K SLoC