From: Olonichev Sergei Date: 2002-03-01T18:40:56+09:00 Subject: Ruby Regular Expression problem Hello, I faced the problem of Regular Expression (RE) matching speed in real application, a model of it is shown below. What RE mechanisms are deployed in Ruby? Are there any Ruby libraries of DFA-based RE? 1. echo "=XX=================================" | grep '/X((.)*..?.)+X/' Ok. 2. echo "=XX=================================" | gawk '/X((.)*..?.)+X/' Ok. 3. echo "=XX=================================" | ruby -e 'a=$stdin.gets; if a =~ "X((.)*..?.)+X" then puts $& end' Hangs up !!! ruby -v ruby 1.6.2 (2000-12-18) [i386-cygwin] BR, Sergei