title: "给定 /^"([^"]+)" replaced with "([^"]+)" in the ([^\s]+) file$/" post_status: publish comment_status: open taxonomy: category: - wp-cli-handbook post_tag: - Behat Steps - References - Repos


给定 /^"([^"]+)" replaced with "([^"]+)" in the ([^\s]+) file$/

使用正则表达式在文件中搜索并替换字符串。


用法

Scenario: 我的示例场景
  Given "Foo" replaced with "Bar" in the readme.html file
  ...

Behat 步骤文档在每次发布时从 WP-CLI 代码库生成。如需改进,请提交拉取请求。

相关