Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7733439
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T06:59:22+00:00 2026-06-01T06:59:22+00:00

I am using the jQuery DataTables plugin to do filtering on a set of

  • 0

I am using the jQuery DataTables plugin to do filtering on a set of table results. My table lists customers and members which they are a group of. I have a dropdown that allows the user to filter the table for those customers who members of a particular group. My problems is that customers can be members of multiple groups and all of these are listed in a single column.

For example, Joe might be a member of the following groups:

  • Group 1
  • Group 5
  • Group 10

If I do regular filtering (see below), and the user selects “Group 1” from the dropdown, it will still show customers who are members of “Group 10”.

function fnFilterColumn ( i ){
    $('#results').dataTable().fnFilter(
        $("#filter").val(),
        i,
        false            
    );
}

If I enable Regex (see below), then it does an “exact” match. So if the user selects “Group 1” from the dropdown, it will only show customers who are only members of “Group 1”.

function fnFilterColumn ( i ){
     $('#results').dataTable().fnFilter(
         '^' + $("#filter").val() + '$',
         i,
         true        
    );
}

How would I go about making it filter for “whole phrase matching”. So a filter for “Group 1” will show those in “Group 1”, without grabbing “Group 10” too. Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T06:59:24+00:00Added an answer on June 1, 2026 at 6:59 am

    The regex approach seems to be sensible.
    Just use word boundaries instead of start / end anchors:

    function fnFilterColumn ( i ){
        $('#results').dataTable().fnFilter(
            '\\b' + $("#l"+(i)+"_filter").val() + '\\b',
            i,
            true        
        );
    }
    

    If you do it this way, you will match multiple groups too.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have started using the DataTables plugin (v1.6.2) for jQuery (v1.4.2), and I would
I am using the jquery plugin DataTables for table sorting and manipulation. In a
I'm using the jQuery DataTables plugin, which is working really great so far. However
I have been using the DataTables plugin for jQuery (http://www.datatables.net) to search, sort and
I'm using the dataTables jQuery plugin (which is totally awesome), but I'm having trouble
So I am using the JQuery DataTables plugin, and have configured it to use
I have been looking for some examples and solutions using the jquery-datatables-editable plugin and
I'm using Datatables and have this jquery plugin showing in a few columns http://www.erichynds.com/jquery/jquery-ui-multiselect-widget/
I am using the jQuery DataTables plugin. I would like to move the search
I am using the jquery plugin datatables and am trying to take advantage of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.