A
Ahmet Kilic
Hello,
I am trying regex samples on this page
http://gnosis.cx/publish/programming/regular_expressions.html.
My problem is, how can I grep multiline with regex?
This is my example;
...
*****************************************************************************)
function TfrmExecMain.SetPrivilege(PrivilegeName: String;
Enable: Boolean): Boolean;
var
tpPrev,
tp : TTokenPrivileges;
token : THandle;
dwRetLen : DWord;
begin
...
I want to print some parts of this.
for example;
if function=~/\b(^function)\s+(\w+)/
print this part===> : Boolean;
end
if line.match(/var/) and line.match(/begin/)
print this part ==> : TTokenPrivileges;
print this part ==> : THandle;
and print this ==> : DWord;
end
How can i do it?
I am trying regex samples on this page
http://gnosis.cx/publish/programming/regular_expressions.html.
My problem is, how can I grep multiline with regex?
This is my example;
...
*****************************************************************************)
function TfrmExecMain.SetPrivilege(PrivilegeName: String;
Enable: Boolean): Boolean;
var
tpPrev,
tp : TTokenPrivileges;
token : THandle;
dwRetLen : DWord;
begin
...
I want to print some parts of this.
for example;
if function=~/\b(^function)\s+(\w+)/
print this part===> : Boolean;
end
if line.match(/var/) and line.match(/begin/)
print this part ==> : TTokenPrivileges;
print this part ==> : THandle;
and print this ==> : DWord;
end
How can i do it?