Function __global->simulated_wildcard_match

Definitions

sources/global2.php

  • Do a wildcard match by converting to a regular expression.Supports the '%' and '_' wildcards and '\' escaping of them (as per most SQL implementations of LIKE).
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: bool

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$target string No No required parameter N/A N/A The haystack
$expression string No No required parameter N/A N/A The needle (a wildcard expression)
$full_cover boolean No No False N/A N/A Whether full-coverage is required
$case_sensitive boolean No No False N/A N/A Whether it is case sensitive

Returns

  • Whether we have a match
  • Type: boolean
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Do a wildcard match by converting to a regular expression.Supports the '%' and '_' wildcards and '\' escaping of them (as per most SQL implementations of LIKE).
 *
 * @param  string $target The haystack
 * @param  string $expression The needle (a wildcard expression)
 * @param  boolean $full_cover Whether full-coverage is required
 * @param  boolean $case_sensitive Whether it is case sensitive
 * @return boolean Whether we have a match
 */

function simulated_wildcard_match(string $target, string $expression, bool $full_cover = false, bool $case_sensitive = false) : bool
 

sources/minikernel.php

  • Do a wildcard match by converting to a regular expression.Supports the '%' and '_' wildcards and '\' escaping of them (as per most SQL implementations of LIKE).
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: bool

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$target string No No required parameter N/A N/A The haystack
$expression string No No required parameter N/A N/A The needle (a wildcard expression)
$full_cover boolean No No False N/A N/A Whether full-coverage is required
$case_sensitive boolean No No False N/A N/A Whether it is case sensitive

Returns

  • Whether we have a match
  • Type: boolean
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Do a wildcard match by converting to a regular expression.Supports the '%' and '_' wildcards and '\' escaping of them (as per most SQL implementations of LIKE).
 *
 * @param  string $target The haystack
 * @param  string $expression The needle (a wildcard expression)
 * @param  boolean $full_cover Whether full-coverage is required
 * @param  boolean $case_sensitive Whether it is case sensitive
 * @return boolean Whether we have a match
 */

function simulated_wildcard_match(string $target, string $expression, bool $full_cover = false, bool $case_sensitive = false) : bool