脱字符号 (^)

使用脱字符号可匹配位于字符串开头的以下相邻字符。

例如,^St 与以下内容匹配:

  • Start here
  • Stand here
  • Stop here

不过,^St 与以下内容不匹配:

  • 1 Start here
  • 2 Stand here
  • 3 Stop here

前三行以数字和空格开头,而不是以字母“St”开头。

使用此类正则表达式可创建与 URI 匹配的细分、过滤条件或目标步骤。例如,如果您需要隔离特定网页目录的数据,可以使用如下表达式:

  • ^/mens/ (matches www.example.com/mens/)
  • ^/womens/ (matches www.example.com/womens/)