How can I make the following regular expression ignore all whitespaces?
$foo = ereg_replace("[^áéíóúÁÉÍÓÚñÑa-zA-Z]", "", $_REQUEST["bar"]);
Input: Ingeniería Eléctrica'*;<42
Current Output: IngenieríaEléctrica
Desired Output: Ingeniería Eléctrica
I tried adding /s \s\s* \s+ /\s+/ \/s /t /r among others and they all failed.
Objective: A regex that will accept only strings with upper or lower case characters with or without (spanish) accents.
Thank you !