sample_regex

Function sample_regex 

Source
pub fn sample_regex(
    regex: &Regex,
    builder: &mut ReBuilder,
    max_depth: usize,
    comp: bool,
) -> SampleResult
Expand description

Tries to sample a word that is accepted by the regex. The function aborts if no word is found after max_depth steps. If comp is set to true, the function will return a word that is not accepted by the regex. In other words, the function will sample a word from the complement of the regex’s language.