UNIX-style RegExp Replace running extremely slowly under windows. Help?
Posted
by John Sullivan
on Stack Overflow
See other posts from Stack Overflow
or by John Sullivan
Published on 2010-03-30T19:06:40Z
Indexed on
2010/03/30
19:13 UTC
Read the original article
Hit count: 262
regex
|regex-negation
I'm trying to run a unix regEXP on every log file in a 1.12 GB directory, then replace the matched pattern with ''
. Test run on a 4 meg file is took about 10 minutes, but worked. Obviously something is murdering performance by several orders of magnitude.
Find: ^(?!.*155[0-2][0-9]{4}\s.*).*$
-- NOTE: match any line NOT starting 152[0-2]NNNN where in is a number 0-9. Replace with: ''.
Is there some justifiable reason for my regExp to take this long to replace matching text, or is the program I am using (this is windows / a program called "grepWin") most likely poorly optimized?
Thanks.
© Stack Overflow or respective owner