I want to match letters and ignore diacritics (accents, umlauts, circumflex, etc)
I want to match the letter u in my REGEX against u in a string regardless of how the u looks, i.e. the letter u in the REGEX should match ù or ú or û or ü in the input string.
Example: 'arger' or 'facade' should match 'Ärger', façade'.
(Yes, I have spent hours looking for a simple PHP example of this on a gazillion websites and I have also experimented with much code to try this).
Output from this is: begin0
I have PHP Version 5.1.4
and PCRE Library Version 6.6 06-Feb-2006.
Please help --I've begun to slap my monitor.
I want to match the letter u in my REGEX against u in a string regardless of how the u looks, i.e. the letter u in the REGEX should match ù or ú or û or ü in the input string.
Example: 'arger' or 'facade' should match 'Ärger', façade'.
(Yes, I have spent hours looking for a simple PHP example of this on a gazillion websites and I have also experimented with much code to try this).
Code:
<?PHP
echo ' <BR> begin';
$str1 = "get thè hellò of here";
$pattern1 = "/the\shello/ui";
echo preg_match($pattern1, $str1);
?>
Output from this is: begin0
I have PHP Version 5.1.4
and PCRE Library Version 6.6 06-Feb-2006.
Please help --I've begun to slap my monitor.