使用插入符号可匹配位于字符串开头的相邻字符。
例如,^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/)