I am pretty new to regular expressions. I need to clean up a search string from spaces at the beginning and the end. Example: \" search string \" Result: \"search string\">
If it's only white-space, why not just use trim()?