首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Server全文搜索中的通配符

Server全文搜索中的通配符
EN

Database Administration用户
提问于 2018-05-05 15:27:54
回答 1查看 5.1K关注 0票数 4

在查找全文搜索时,我发现了文章

FTS区分定义为通配符的符号和其他符号。以下是FTS中用作通配符的几个符号:

代码语言:javascript
复制
+==================================+========+==============================================================================================================================================================================================================+
|            Expression            | Syntax |                                                                                                 Description                                                                                                  |
+==================================+========+==============================================================================================================================================================================================================+
| Any Character                    | .      | Matches any single character except a line break.                                                                                                                                                            |
+----------------------------------+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Zero or more                     | *      | Matches zero or more occurrences of the preceding expression, making all possible matches.                                                                                                                   |
+----------------------------------+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| One or more                      | +      | Matches at least one occurrence of the preceding expression.                                                                                                                                                 |
+----------------------------------+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Beginning of line                | ^      | Anchors the match string to the beginning of a line                                                                                                                                                          |
+----------------------------------+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| End of line                      | $      | Anchors the match string to the end of a line.                                                                                                                                                               |
+----------------------------------+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Beginning of word                | < | Matches only when a word begins at this point in the text.                                                                                                                                                   |
+----------------------------------+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| End of word                      | >      | Matches only when a word ends at this point in the text.                                                                                                                                                     |
+----------------------------------+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Line break                       | \n     | Matches a platform-independent line break. In a Replace expression, inserts a line break.                                                                                                                    |
+----------------------------------+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Any one character in the set     | [ ]    | Matches any one of the characters within the [ ]. To specify a range of characters, list the starting and ending character separated by a dash (-), as in [a-z].                                             |
+----------------------------------+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Any one character not in the set | [^...] | Matches any character not in the set of characters following the ^.                                                                                                                                          |
+----------------------------------+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Or                               | |      | Matches either the expression before or the one after the OR symbol (|). Mostly used within a group. For example, (sponge|mud) bath matches "sponge bath" and "mud bath."                                    |
+----------------------------------+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Escape                           | \      | Matches the character that follows the backslash (\) as a literal. This allows you to find the characters used in regular expression notation, such as { and ^. For example, ^ Searches for the ^ character. |
+----------------------------------+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Tagged expression                | {}     | Matches text tagged with the enclosed expression.                                                                                                                                                            |
+----------------------------------+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| C/C++ Identifier                 | :i     | Matches the expression ([a-zA-Z_$][a-zA-Z0-9_$]*).                                                                                                                                                           |
+----------------------------------+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Quoted string                    | :q     | Matches the expression (("[^"]*")|('[^']*')).                                                                                                                                                                |
+----------------------------------+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Space or Tab                     | :b     | Matches either space or tab characters.                                                                                                                                                                      |
+----------------------------------+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Integer                          | :z     | Matches the expression ([0-9]+).                                                                                                                                                                             |
+----------------------------------+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

但是我找不到任何关于这种可能性和用法的信息(除了*之外)。有人能帮忙吗?

EN

回答 1

Database Administration用户

回答已采纳

发布于 2019-09-23 14:20:41

我怀疑所有这些符号是否得到支持。符号列表可能是从这里中提取的。但是,这会记录(SSMS)功能。

唯一受支持的符号是单词末尾的星号(*)。请参阅文档这里,在此页面中搜索。

票数 3
EN
页面原文内容由Database Administration提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://dba.stackexchange.com/questions/205930

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档