_ matches the character _ with index 9510 (5F16 or 1378) literally (case sensitive)
\d matches a digit (equivalent to [0-9])
\+ matches the character + with index 4310 (2B16 or 538) literally (case sensitive)
\. matches the character . with index 4610 (2E16 or 568) literally (case sensitive)
htm matches the characters htm literally (case sensitive)
Global pattern flags
g modifier: global. All matches (don't return after first match)
1条答案
按热度按时间pkwftd7m1#
替换子字符串
将此正则表达式与替换命令
%s
一起使用说明(来自regex101.com):
替换词
上面的正则表达式将匹配
ab_123.htm
中的123.htm
。如果要匹配一个单词,请使用vim的 * 单词边界 *\<
和\>
:(see(第10页)