What are the potential issues with using regular expressions in PHP, especially when dealing with special characters like umlauts?

When using regular expressions in PHP, especially when dealing with special characters like umlauts, it's important to consider the character encoding. If the regular expression pattern or the input string contains special characters, it's recommended to use the 'u' modifier in the regular expression to ensure proper handling of Unicode characters. This modifier tells PHP to treat the pattern and subject strings as UTF-8 encoded.

$pattern = '/ä/';
$input = 'Müller';
if (preg_match($pattern, $input, $matches)) {
    echo 'Match found!';
} else {
    echo 'No match found.';
}