Regular Expression Search in DataTables
We use DataTables on many pages to display SQL database queries. There you will now find a regex checkbox near to the global search input, which you used to access this page. The regex option allows you to apply significantly more complex filters across the entire table or individual columns.
- What is regex? https://en.wikipedia.org/wiki/Regular_expression
- Learn to use regex: https://regexlearn.com/learn/regex101
- Test your regex: https://regex101.com
So if you only want to show the rows with XL or L in a table of clothing sizes, you can use this search expression: \b(XL|L)\b.
() => Capturing Group, | => OR, \b => Word Boundary.