Possible to do wildcard filtering?

Possible to do wildcard filtering?

newtodatatablesnewtodatatables Posts: 31Questions: 0Answers: 0
edited May 2011 in DataTables 1.8
Hi, I am trying to do wildcard filtering on a datatables. I have looked through the API but cant seem to get it.

For example I have apple, banana, orange, 'banana mango' in a column. When i use *e it should display apple as 'e' is the last letter. Or when I search "b* m*" it should display 'banana mango'. Is there anyway to do this? Thanks.

Replies

  • allanallan Posts: 61,650Questions: 1Answers: 10,094 Site admin
    Yes this is possible, using regular expressions:

    http://datatables.net/api#fnFilter
    http://datatables.net/examples/api/regex.html

    So to use regex, you'll need to build up your own regex and then call fnFilter with DataTables' smart filtering turned off (as described in the documentation).

    Allan
  • newtodatatablesnewtodatatables Posts: 31Questions: 0Answers: 0
    Thank you for your help. I am trying my best to understand the api.
This discussion has been closed.