pub fn promote_pattern(source: &str) -> (String, PatternDialect)Expand description
Classify source and return its anchored regex source + dialect.
Pure — does not compile. Promotion rules:
- any regex metachar → full regex,
^(?:src)$ - else if it contains
*→ glob, each*→.*,^…$ - else → literal,
^escape(src)$