__md__ Posted February 23, 2010 Share Posted February 23, 2010 Hi all Can someone please explain to me exactly what this code is doing please i would bee very grateful function ValidatorTrim(s) { var m = s.match(/^\s*(\S+(\s+\S+)*)\s*$/); return (m == null) ? "" : m[1]; } Link to comment https://forums.phpfreaks.com/topic/193079-remove-all-white-space-code-help-please/ Share on other sites More sharing options...
developerdave Posted February 23, 2010 Share Posted February 23, 2010 function ValidatorTrim(s) { var m = s.match(/^\s*(\S+(\s+\S+)*)\s*$/); return (m == null) ? "" : m[1]; } Its a code highlighter and s is your search term/keyword to highlight Link to comment https://forums.phpfreaks.com/topic/193079-remove-all-white-space-code-help-please/#findComment-1016823 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.