VIM - Vi IMproved 7.3
我正在使用上面的vim版本.我搜索ALWays_ff并且没有匹配.如果我搜索always_ff,我会得到一个匹配.我很困惑..
我想在vim中做以下几点.
a,2为a@,a@b,3为b@,b@,b@c,6为c@,c@,c@,c@,c@,c@
等等我的脚本中有以下代码.
if($description =~ /\'/) {
print "I am here\n";
$description =~ s/\'/'/g;
}
print "description = $description\n";
Run Code Online (Sandbox Code Playgroud)
当我运行这个脚本时,"I am here\n"由于比较失败,我没有得到输出.
但是,当$description字符串确实包含撇号时.
$description = "The baseball player’s spiritual redemption and recovery from drug addiction.";
上下文:我正在解析从调用nytimes bestsellers api(以json格式返回)获得的字符串,并且此字符串存储在$description字符串中.