Hello, I am extracting lines from a text file with the regex task. I'm finding that if the source file is 50k or so, the search takes 10-15 seconds. The performance is dramatically worse if the input is bigger, becoming 5+ minutes by the time the file is 100k. Anyone else seen this?
I don't use regex much, so I'm hoping I'm doing something inefficiently. The code is below. Any help is appreciated. <loadfile file="${inputfilename}" property="fileContent" verbose="false"/> <regex pattern="^[\s\S]*${startstring2}(?'matchedLines'[\s\S]*)[\s\S]*${endstring2}" input="${fileContent}"/> <echo message="${matchedLines}" file="${outputfilename}" append="true"/> THX Curt ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ NAnt-users mailing list NAnt-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-users