From: 7stud -- Date: 2009-09-11T10:25:55+09:00 Subject: Re: regex: multiline Robert Klemme wrote: > 2009/9/10 7stud -- : >>> function TfrmExecMain.SetPrivilege(PrivilegeName: String; >>> for example; >> >> ENDOFSTRING >> >> md = str.match(/function.*?\):\s+(.*?;)/m) >> if md >>  puts md[1] >> end >> >> --output:-- >> Boolean; > > Note that you do not need the /m flag for this to match. This works > the same without it. Note that you are wrong: str =< nil -- Posted via http://www.ruby-forum.com/.