[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: pattern matching and replacing
- From: ketmar <ketmar@...>
- Date: Tue, 17 Jun 2008 16:10:48 +0300
On Tue, 17 Jun 2008 14:43:46 +0200
"daniel rahmeh" <daniel.rahmeh@gmail.com> wrote:
> my original query is: Insert into sometable (username, password,
> phone) values ('test', 'tespasswd', '123456789')
>
> i want my query to be modified to: Insert into sometable (username,
> password, phone) values ('test', SHA1('tespasswd'), '123456789')
maybe something like this:
res = query:gsub("values%s*%('[^']*',%s*%(('[^']*')%)", "SHA1(%1)");