Crate easy_regex

Source
Expand description

This crate implements another way of writing regualar expressions as if they are pseudocodes, they will be easier to understand and debug, especially the long ones.

To start writing a regex using this crate, there are several ways (see head_or_tail) of which new and new_section are the common methods. The new method takes an &str as input and makes a raw expression while the new_section method needs no input and basically creates an empty string to write the intented expressions by method chaining. To take the prepared regex out of the chain, the last method will be get_regex which outputs a Result including a regex of type Regex or an Error. The get_regex will in fact use the RegexBuilder::new and RegexBuilder::build methods of the regex crate.

Modules§

collection
A handful of universal regular expressions.
group
Creates a group pattern in many different ways as desired.
head_or_tail
Includes methods for starting/ending chain of expressions.
helpers
Some helper methods to create patterns like HTML Elements and non-english languages.
list
Creates list patterns.
literal
Creates expressions to match literal characters.
metacharacters
Methods related to metacharacters.
settings
Flags, Special Characters etc. classified as Settings to be used as necessary meta information for patterns.

Structs§

EasyRegex
Main struct includes methods to be chained together in order to create a regular expression.