数据表智能搜索 v 无智能搜索 v 正则表达式

2024-03-15

鉴于这种数据表 https://datatables.net/examples/api/regex.html例如,可以选择正则表达式、smartserach 或两者都不选择(正则表达式、smartserach) 智能搜索有什么作用?

例如在名称列下:
typing Ai搜索中会返回 4 个条目,无论是否勾选了智能搜索。谁能提供一个例子,我可以看到智能搜索勾选与否的区别?

例如在名称列下:
typing ^[A]将返回 3 个带有正则表达式勾选的条目。在此示例中,勾选智能搜索与否似乎没有什么区别。同样,任何人都可以提供一个示例,让我可以看到勾选了智能搜索与勾选了正则表达式的差异吗?


EDIT1

this link https://datatables.net/reference/option/search是可能有帮助的文档

from here https://datatables.net/reference/api/columns().search()建议启用智能搜索和正则表达式可能不太好:Note that to perform a smart search, DataTables uses regular expressions, so if enable regular expressions using the second parameter to this method, you will likely want to disable smart searching as the two regular expressions might otherwise conflict and cause unexpected results.


See search.smart https://datatables.net/reference/option/search.smart选项了解更多详细信息。

DataTables 的内置过滤是“智能”的,因为它将用户的输入分解为单个单词,然后在表中的任何位置和任何顺序中匹配这些单词(而不是简单地进行简单的字符串比较)。

In 这个例子 https://datatables.net/examples/api/regex.html typing Junior Author在位置栏中会发现Junior Technical Author“智能”模式启用时的位置。禁用“智能”模式后,将找不到任何内容。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

数据表智能搜索 v 无智能搜索 v 正则表达式 的相关文章

随机推荐