A filter function would do:

$('elements').filter(function(){
    return $(this).text() == 'ants';
});

- ricardo

On Nov 27, 8:04 am, Dovdimus Prime <[EMAIL PROTECTED]> wrote:
> Hi all
>
> The :contains(text) selector will select any element that contains the
> specified text (similar to a like '%stuff%' database query).
>
> How can I find only exact matches?
>
> i.e. if I'm searching for 'ants', to find only elements containing the
> text 'ants', and not elements containing the text 'pants' or 'antsy'?
>
> Thanks
>
> David

Reply via email to