Does anyone know how to replace white spaces in the beginning and end of the string with   using regular expression and javascript;
Example:
`   Hello World. The white spaces in between the sentence should not be replaced. Only the start and end should be replaced with  .   `
After replacing:
`   Hello World. The white spaces in between the sentence should not be replaced. Only the start and end should be replaced with  .   `
 
    