Re: pattern matching and replacing
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: pattern matching and replacing
- From: ketmar <ketmar@...>
- Date: 2008年6月17日 16:10:48 +0300
On 2008年6月17日 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)");