From: Russell Fulton Date: 2007-08-02T07:04:15+09:00 Subject: oddity with RegExp I'm clearly missing something! I have a log analysis application that is written in Ruby and which uses REs to decide how to process log records. I entered a pattern into one of my rules and it always failed to match so I fired up irb and set about reducing the pattern to something minimal: [rful011@pateke selms-svn]$ irb irb(main):001:0> a = 'NT AUTHORITY\SYSTEM' => "NT AUTHORITY\\SYSTEM" irb(main):004:0> a =~ /AUTHORITY/ => 3 irb(main):005:0> a =~ /NT AUTHORITY/ => 0 irb(main):006:0> a =~ / AUTHORITY/ => 2 irb(main):007:0> a =~ /^NT / => 0 irb(main):008:0> a =~ /NT / => 0 irb(main):009:0> a =~ /NT/ => 0 irb(main):010:0> a =~ /N/ => 0 irb(main):011:0> a =~ /T/ => 1 Is the '\' in the string upsetting things? Cheers and thanks, Russell -- Posted via http://www.ruby-forum.com/.