[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Removing whitespace at the beginning and at the end of a string
- From: Choonster TheMage <choonster.2010@...>
- Date: Sat, 15 Jun 2013 03:25:53 +1000
On 15 June 2013 03:22, <firstname.lastname@example.org> wrote:
> is there a way to remove leading and trailing whitespace (inluding \n
> or \r ) from a string with lua without using lpeg or loading a C-Lib
> for regexp?
> Thank you very much in advance for any help!
> Best regards,
somestring = somestring:match("^%s*(.+)%s*$")