美元符号 ($)
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
使用美元符号可匹配位于字符串结尾的相邻字符。
例如,`end$` 与以下内容匹配:
- Temporarily suspend
- We're going off the deep end
- Match the characters that prepend
不过,`end$` 不匹配以下内容:
- Temporarily suspend.
- We're going off the deep end.
- Match the characters that prepend.
前三行都以 nd. 结尾,而不是您使用正则表达式匹配的 end 字符。
使用此类正则表达式可创建与 URI 匹配的细分、过滤条件或目标步骤。例如,如果您要测试网页的新 HTM 版本与旧 HTML 版本相比的效果,可以使用以下正则表达式分别识别这两个版本:
- email-signup\.htm$
- email-signup\.html$
使用反斜杠转义点,确保按字面意思解释点。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-09-18。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-09-18。"],[],[],null,[]]