Ryan Pavlik [mailto:rpav / nwlink.com] wrote:

> Longer, possibly more efficient way:
> 
>     re = array.join('|')
>     s.gsub!(/(#{re})/, "*")
> 
> The second way is probably more efficient, since it can 
> optimize the match and do it in one pass.

not sure if that would scale up to a 10000 entry array though..

> Ryan Pavlik <rpav / users.sf.net>
> 
> "And I'm 10,000 feet up in the air. Dang it." - 8BT


kind regards- botp