From: Stefan Mueller Date: 2001-07-21T06:22:43+09:00 Subject: [ruby-talk:18199] Pattern Matching takes all Resources I'm having some big problems with Pattern Matching of Regex. The example blocks everything in the main thread, for quite a while. I don't want the Regex to magically match a String it can't match, but would like to prevent it from trying forever, as I'm doing this with a big html file in a String. If it would not block the main thread, and let me realize in the caller that it's taking too long, I'd be happy too. ruby 1.6.4 (2001-06-04) [i386-freebsd4.3] # example aString = '' # the culprit aRegEx = /<(\w*|\s*|\d*|[%=:".,\/?!\-_#]*)*>/ # some HTML TAG Regex Thread.new { aString =~ aRegEx } # blocks ca. 20s --- Stefan Mueller