Revision: 68763
Updated Code
at February 21, 2015 09:51 by jatubio
Updated Code
function regex_spaces($string) { return str_replace(' ','\s+',$string); }
Revision: 68762
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at February 21, 2015 07:35 by jatubio
Initial Code
// Sustituye los espacios por '\s+' que quiere decir uno o varios espacios function regex_spaces($string) { return str_replace(' ','\s+',$string); }
Initial URL
Initial Description
Replaces spaces by '\s+' which means one or more spaces $string can be one string or one array of strings
Initial Title
// Search multiple spaces with regex expressions
Initial Tags
regex
Initial Language
PHP