What exactly is this line for
preg_replace('#[^0-9a-z]+#i', '-', parent::filter($string))
in the following method in \vendor\magento\framework\Filter\TranslitUrl.php:
public function filter($string)
{
$string = preg_replace('#[^0-9a-z]+#i', '-', parent::filter($string));
$string = strtolower($string);
$string = trim($string, '-');
return $string;
}
The method is used to filter strings which will be used in URLs, and I know that line replaces some strings with -
character. But I don't fully understand what exactly this pattern #[^0-9a-z]+#i
matches.
I will appreciate any hints.