From: Mike Stok Date: 2006-05-11T06:34:56+09:00 Subject: Re: How to matching "[" in string On 10-May-06, at 5:27 PM, sed_nivo wrote: > How to matching "[" in string with regular expressions? > > "[" =~ /\[/ -- don't work. What do you mean by "don't work"? What do you expect? Have you read the documentation for String#=~? ratdog:~ mike$ irb irb(main):001:0> "[" =~ /\[/ => 0 irb(main):002:0> "x" =~ /\[/ => nil irb(main):003:0> "this[that]" =~ /\[/ => 4 Mike -- Mike Stok http://www.stok.ca/~mike/ The "`Stok' disclaimers" apply.