From: ts Date: 2002-03-17T20:35:30+09:00 Subject: [Oni Guruma] some problematic regexp With this version (I hope this is the latest) pigeon% grep ONI.*VERSION *.h regex.h:#define ONIGURUMA_VERSION 120 /* 1.2 */ pigeon% It segfault with such regexp (this is just that it can have null node in its tree, and actually it's not tested) /(?i)(*)b/ /(?i)(abc/ /(?i)*a/ /a|*/ same with +? /a|{1}/ I've found very strange the result given by this regexp pigeon% ./ruby -e '/({)/ =~ "{"; puts $1' { pigeon% when it give pigeon% ./ruby -e '/{/ =~ "{"; puts $&' -e:1: end pattern at left brace: /{/ pigeon% Same for this regexp pigeon% ./ruby -e '/[\]/ =~ "]"; puts $&' ] pigeon% pigeon% ./ruby -e '/[\o/ =~ "o"; puts $&' -e:1: premature end of char-class: /[\o/ pigeon% I've not understood this regexp pigeon% ./ruby -e '/()*/' -e:1: target of repeat-qualifier is empty: /()*/ pigeon% well pigeon% ./ruby -e 'puts "ok" if /(a*)*/ =~ ""' ok pigeon% the target can be empty in this case and it can handle it Guy Decoux