Кто-нибудь знает, как заменить пробелы в начале и конце строки с помощью регулярного выражения и JavaScript;
Пример:
` Hello World. The white spaces in between the sentence should not be replaced. Only the start and end should be replaced with  . `
После замены:
` Hello World. The white spaces in between the sentence should not be replaced. Only the start and end should be replaced with  . `