I have a problem with the preg_replace function.
In my code i will use it to delete all chars that are not letters or numbers at the beginning of a string.
This works well, but when the $string contains iso-8859-1 character like " è, ò, à, ù, é, ì " there are considered not words, and all were removed.
preg_replace('/^[^a-zA-Z0-9]+/', '', $string);
ie. If $string
contains èxample
the output will be xample
.
I need that these iso-8859-1 vowels are included.
Anyone have a solution to this?