OK, I got it, the only problem is that the value comes from a variable. Is there any way to use a variable as a regex?
On Thu, May 22, 2008 at 12:28 PM, Scott Sauyet <[EMAIL PROTECTED]> wrote: > > Karl Swedberg wrote: > >> I agree that a filter function is probably the way to go, but a regular >> expression within it might be more flexible: >> >> $('something').filter(function() { >> return (/value/i).test( $(this).attr('attribute')); >> }); >> > > Right. Was that me last week teasing a junior developer for using twenty > line of code when a one-line regex would do? :-) > > -- Scott >