Joshua Ball
12/18/2008 5:03:00 AM
[Note: parts of this message were removed to make it a legal post.]
Arg... regex...I am new to them. ;-) You are right, of course.
Thanks (for the correction and the !~)
On Wed, Dec 17, 2008 at 8:57 PM, Tim Greer <tim@burlyhost.com> wrote:
> Joshua Ball wrote:
>
> >
> > Actually, the regex should have the end of string anchor:
> > array.delete_if { |elem| not elem =~ /.bmp$/i }
> >
>
> Also, remember that . is any character, whereas \. is just . for the
> sake of getting exactly what you want. !~ looks cleaner to me, but
> that's just personal preference in most cases.
> --
> Tim Greer, CEO/Founder/CTO, BurlyHost.com, Inc.
> Shared Hosting, Reseller Hosting, Dedicated & Semi-Dedicated servers
> and Custom Hosting. 24/7 support, 30 day guarantee, secure servers.
> Industry's most experienced staff! -- Web Hosting With Muscle!
>
>