On 01/21/2016 06:42 AM, Wolfgang Jenkner wrote: > On Thu, Jan 21 2016, Clément Pit--Claudel wrote: > >> I'm running into a surprising regular expressions issue. I have attached a file (~50k) in which (re-search-forward " +[^:=]+ +:=?") seems to be extremely slow. (I killed it after 30 seconds). Truncating the file to its first 20 lines reduces the time for re-search-forward to about a second, which is still extremely slow. > > Perhaps you meant > > (re-search-forward " +[^:=\n]+ +:=?") I don't think so; I do want newlines in there.