Skip to main content

register_custom_pattern

Function register_custom_pattern 

Source
pub fn register_custom_pattern(
    name: impl Into<String>,
    regex_source: &str,
) -> Result<(), String>
Expand description

Register a custom named pattern on the calling thread. Returns an error if the regex fails to compile. The pattern is appended after the default catalog, so default patterns still win when multiple would match the same substring.