Skip to main content

is_matching_backtracking

Function is_matching_backtracking 

Source
pub fn is_matching_backtracking(
    topic: MStr<Topic>,
    pattern: MStr<Pattern>,
) -> bool
Expand description

Match a topic against a pattern with wildcard support.

Wildcards:

  • * matches zero or more characters
  • ? matches exactly one character

Uses a greedy two-pointer algorithm. Chosen over DP (O(n*m) space), recursive backtracking (stack overflow risk), and regex (compilation overhead).