[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Trailing spaces
- From: "Danilo Tuler de Oliveira" <tuler@...>
- Date: Wed, 8 May 2002 15:16:53 -0300
Hi,
I'm looking for a gsub pattern to remove leading and trailing spaces.
Some examples:
" Lua " -> "Lua"
"Lua " -> "Lua"
" Lua" -> "Lua"
" Lua Language " -> "Lua Language"
" " -> ""
The best I could do is "^%s*(.*%S)%s*$", but this doesn't
work with the last example.
I guess there is something simpler.
Thanks,
Danilo