Bug #1740
closedruby regexp 100% usage cpu.
Description
=begin
On freebsd i'm test ruby
ruby 1.8.7 (2009-04-08 patchlevel 160) [i386-freebsd6]
And my linux notebook
ruby -v ruby 1.8.7 (2009-06-08 patchlevel 173) [x86_64-linux]
For this code
#######################################
require 'open-uri'
$KCODE = 'u'
reg = %r{<.?div\sclass\s*=\s*.entry.?>[^<]<.?img\ssrc\s*=\s*.([^"|']).?>[^<]<.?p\sclass\s=\s*.date.?>}im
#del = %r{<(?!p|div|img)[^>]>}i
doc = open('http://www.radiokvit.com.ua/?p=1895').read
#doc.gsub!(del, ' ')
a = doc.match(reg)
p a
######################################
My ruby process use 100% cpu for long time and on linux exit normaly, on freebsd no exit %-(.
I'm submited another bug for freebsd http://www.freebsd.org/cgi/query-pr.cgi?pr=136384 but this is for freebsd only.
This templates writes another man for perl and i'm must use here.
=end
Files