Functional RegExp (original) (raw)
1.0
Regular expressions are wonderful tools and very powerful; however, complex expressions can be hard to write and harder to debug. The goal of this crate is to provide a set of functions that compose a regular expression as a set of strings. While this approach is more verbose, as can be seen in the examples below, it is more readable and easier to compose.
"((([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+| |
---|
(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)(:[0-9]{0,5})?(#[\w]*)? |
((?:\/[\+~%\/.\w\-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[.\!\/\\w]*))?)" |
Example: