Function infer_regex

Source
pub fn infer_regex(example: String, samples: Vec<String>) -> Option<Regex>
Expand description

Tries to find a regex that best matches the provided example and the samples The example may or may not be part of the sample list, it doesn’t matter Note: the resulting regex is case-insensitive (and lowercase)