Trying to get "only get rows with non-blank entries in specific column" regexp to work

Trying to get "only get rows with non-blank entries in specific column" regexp to work

bflbfl Posts: 26Questions: 7Answers: 1

I want to filter a column to only those that have non-blank entries. It seems like the regular expression [\s\S] should work, but it doesn't seem to. Wondering if anyone has been able to get this kind of thing to work.

doing this:
table.column( columnIndex ).search( '[\s\S]', true, false )
.draw();

since I assume datatables is just using the regexp as is with javascript, and I have successfully tested the regexp (using the AWESOME site https://regex101.com/), I am not sure what is going on. If someone else has gotten this kind of thing to work, it must be something else I am probably not doing right.

This question has an accepted answers - jump to answer

Answers

  • bflbfl Posts: 26Questions: 7Answers: 1

    you know - I need to make sure I'm using the latest version of datatables as well - currently using 1.1.16...

  • bflbfl Posts: 26Questions: 7Answers: 1

    side note - whoa - 1.18 a bit different - scrollx seems to be configured in some different manner

  • bflbfl Posts: 26Questions: 7Answers: 1

    actually - responsive and scrollX don't seem to play well together, at least in terms of my configs...

  • kthorngrenkthorngren Posts: 21,300Questions: 26Answers: 4,945
    edited June 2018 Answer ✓

    For the regex I would probably use ^.+$. Here is an example:

    http://live.datatables.net/xojakane/1/edit

    Not sure about scrollX and Responsive using DT 1.10.18. Allan may be able to say. But the regex should work with 1.10.16 if you need to revert back for now.

    Kevin

  • bflbfl Posts: 26Questions: 7Answers: 1

    woohoo - thanks - worked great.

    My comments on responsive stuff were just ramblings on the way

This discussion has been closed.