string_patterns/lib.rs
1extern crate regex;
2
3mod utils;
4mod pattern_cache;
5pub mod enums;
6pub mod pattern_match;
7pub mod pattern_replace;
8pub mod pattern_filter;
9pub mod pattern_many;
10pub mod pattern_split;
11pub mod pattern_capture;
12pub mod words;
13
14/// This library provides a set of traits and extension methods for &str and/or String
15/// to facilitate common string manipulation routines that may require multiple steps
16/// with the Rust standard library + Regex.
17/// Once installed you need not explicitly add regex::* to your project and
18/// string types will have many new match, replace, split and extract methods.
19/// Most methods imvoling regular expressions have variants ending in result returning the reuslt
20/// type with an error from the Regex crate and without, that return false and skips replacements
21/// if the regular is invalid. Use the main methods if you have tested your regular expression.
22/// There are also variants with a case_insensitive flag and without (_ci and _cs).
23/// When used on arrays or vectors of strings each regular expression will only be compiled and checked once, when you need
24/// to search within a large set of text records.
25/// Always consider the simplest strategy for filtering text before resorting to regular expressions
26
27pub use crate::enums::*;
28pub use crate::pattern_match::*;
29pub use crate::pattern_replace::*;
30pub use crate::pattern_filter::*;
31pub use crate::pattern_many::*;
32pub use crate::pattern_split::*;
33pub use crate::pattern_capture::*;
34pub use crate::words::*;
35pub use crate::utils::build_regex;
36pub use regex::{Error, Regex, Captures, Match};