跳转到内容

表达式符号元素

您可以使用一组共享的表达式语法元素来配置口头表达式和自定义占位符。 这些元素根据结构、字符类型或格式模式,定义了字符串特定部分的匹配方式。

Use the elements below to configure verbal expressions and custom placeholders.

ElementAliasesDescriptionUsage examples
startstartofline, start of linemark expression with ^
endend of, endoflinemark the expression with $
thenfindadd a string to the expressionthen "abc"
maybedefine a string that might appear once or notmaybe "abc"
wordmatch any word that contains characters from a-z, A-Z, 0-9, including the _ (underscore) character
anythingaccept any string
rangeadd a range to the expressionrange "a,z,0,9"
somethingaccept any non-empty string
anythingbutanything butaccept any string but the specified characteranythingbut "abc"
anyofany, any ofany of the listed charactersanyof "abc"
somethingbutsomething butanything non-empty except for these characterssomethingbut "abc"
limitadd character limitlimit "1,3"
linebreakline break, brmatch \r \n (might be used only with other elements)
tabmatch tabs \t (might be used only with other elements)
multipleadds the multiple modifier

在编辑器中,您可以在高级筛选中使用口头表达式来搜索符合特定模式的字符串,类似于正则表达式。 您可以使用它根据标点符号、字符类型、长度等模式筛选字符串。

例如,要查找所有以大写字母开头并以句点结尾的字符串,请使用以下表达式:

start "true", range "A,Z", anything, range "a,z,A,Z,0,9", limit "1,50", then ".", end "true"

该表达式的含义为:

  • start "true" – 字符串从起始位置开始
  • range "A,Z" – 以大写字母开头
  • anything – 后跟任意字符
  • range "a,z,A,Z,0,9" – 允许字母和数字
  • limit "1,50" – 字符串长度在 1 到 50 个字符之间
  • then "." – 以句点结尾
  • end "true" – 字符串末尾

以下是多个口头表达式示例,以及它们在项目中帮助匹配的字符串类型。 当您想要筛选具有特定内容或结构的字符串时,这些示例非常实用。

字符串示例:

A test string.

表达式:

start "true", range "A,Z", anything, range "a,z,A,Z,0,9", limit "1,50", then ".", end "true"

字符串示例:

Visit http://example.com or https://www.example.com

表达式:

then "http", maybe "s", then "://", maybe "www.", anythingbut " "

字符串示例:

Welcome, %s! You have %d new messages.

表达式:

then "%", anyof "s,d"

字符串示例:

Hello, {{user.name}}!

表达式:

then "{{", range "a,z", multiple, then ".", range "a,z", multiple, then "}}"

字符串示例:

Hello, {{User123.name42}}!

表达式:

then "{{", range "a,z,A,Z,0,9", multiple, then ".", range "a,z,A,Z,0,9", multiple, then "}}"

字符串示例:

The result is 3.14159

表达式:

start, range "0,9", multiple, then ".", range "0,9", multiple, end

字符串示例:

Quick Access is available now.

表达式:

start, range "A,Z", range "a,z", multiple, then " ", range "A,Z", range "a,z", multiple

字符串示例:

This is a sentence with trailing space

表达式:

start "true", range "A,Z", anything, range "a,z,A,Z,0,9", then " ", end "true"

字符串示例:

#GettingStarted

表达式:

start "true", then "#", something, end "true"

字符串示例:

Click <strong>here</strong> to continue.

表达式:

then "<", something, then ">"

字符串示例:

Please contact us at support@example.com

表达式:

then "@", somethingbut " "

字符串示例:

This string has extra space.

表达式:

then " "

字符串示例:

Enter your name:

表达式:

then ":", end "true"

字符串示例:

Total: $29.99

表达式:

then "$", range "0,9", multiple

字符串示例:

lowerUpper

表达式:

start, range "a,z", multiple, range "A,Z", range "a,z", multiple, end
本页面对你有帮助吗?