grep - 如何删除 Sublime Text 3 中所有包含撇号的单词
问题描述
解决方案
You could use a character class['’]
to match both variations of the apostrophes and match zero or more times a non-whitespace character \S*
before or after the matched apostrophe followed by optional horizontal white-space chars.
\S*['’]\S*\h*
A slightly more optimized version without preventing the first \S*
causing backtracking could be using a negated character class [^\s'’]*
to match until the first apostrophe.
[^\s'’]*['’]\S*\h*
推荐阅读
- sql - SQL Server 查询返回不正确的结果
- power-automate - 带有触发条件的 CDS 选项集
- python - 从 Python 中的 base64 编码字符串获取公钥
- r - 寻找最佳主题数 k (stm) 的函数之间的差异
- linux - 如果只有 grep 匹配,您如何将通过管道传输到 grep 的内容写入文件
- python - 解压特定目录中的特定文件并解决任何错误情况?
- python - 如何获取除最后 n 个可迭代值之外的所有值
- python - 出现错误:JSONDecodeError:预期值:第 2 行第 1 列(字符 1)
- mysql - 如何获取过敏原数量最多的成分的成分名称?
- android - 删除不需要的十进制“.0”