Skip to main content

combine_patterns

Function combine_patterns 

Source
pub fn combine_patterns(
    case_sensitive: &[impl AsRef<str>],
    case_insensitive: &[impl AsRef<str>],
) -> Option<String>
Expand description

Combine multiple patterns into a single regex string. Case-sensitive patterns are wrapped in (?:...), case-insensitive in (?i:...). This prevents inline flags from leaking between patterns when joined with |. Returns None if no patterns are provided.