From: Martin Pirker Date: 2005-01-10T09:51:22+09:00 Subject: brute force string search Hi... given: String of several Mb problem: find the lines in String containing "xyz" Idea 1: String.scan(/.*xyz.*/) -> ~10s runtime Idea 2: String.grep(/.*xyz.*/) -> ~3s (but gives the \n too) Idea 3: loop String.index("xyz",lastmatch+3) loop results array and grep in match area for line -> 0,5s C extension the only faster option left? :-) Martin