This would do the job using pure NAnt:
<target name="go">
<property
name="file.path"
value="C:\foo\sprocs.txt" />
<foreach
item="Line"
in="${file.path}"
property="line">
<property
name="MATCH"
value="" />
<regex
pattern="(?'MATCH'/sprocs.*\.sql)$"
input="${line}"
failonerror="false" />
<if test="${string::get-length(MATCH) > 0}">
<echo message="match: ${MATCH}" />
<!-- do whatever you want to do with your match -->
</if>
</foreach>
</target>
Not as elegant as palako's solution but it also works.