Le 13 novembre ? 13:52, Max Williams a ?crit :

>>> string = "abc#def"
> => "abc#def"
>>> /#{string}/
> => abc
>>> string = "abc\#def"
> => "abc#def"
>>> /#{string}/
> => abc
>>> Regexp.new(string)
> => abc

Are you sure it's not simply a display problem in IRB ?

>> s = "abc#def"
=> "abc#def"
>> re = /#{s}/
=> abc
>> re.inspect
=> "/abc#def/"
>> re.match("aaaabc#defffff")
=> #<MatchData:0xca0ee0>
>> re.match("aaaabc#defffff")[0]
=> "abc#def"

After a few tests, it seems it comes from wirble, in my case...

Fred
-- 
Courage is not the absence of fear,
but rather the judgement that
something else is more important than fear.
                                                       (Ambrose Redmoon)