Skip to main content

regex.go

regex.go - Overview

This file provides a function for wildcard matching using * and ? wildcards.

Detailed Documentation

Function: WildCardMatch

Purpose: Checks if the given key matches the pattern using * and ? as wildcards. It employs a two-pointer approach for the matching process.

Parameters:

  • pattern (string): The pattern string containing wildcards.
  • key (string): The key string to be matched against the pattern.

Returns:

  • bool: Returns true if the key matches the pattern, and false otherwise.

Getting Started Relevance: NO