Type of regex used by Sublime Text 3?

做~自己de王妃 提交于 2019-12-07 15:18:40

问题


What type of Regex is Sublime Text 3 using? Posix? Posix Extended?


回答1:


Sublime's Search and Search and Replace functions, along with snippets, are powered by Boost's pcre (Perl-Compatible Regular Expressions) engine, while the syntax highlighting language definitions (.tmLanguage or .sublime-syntax files) use the oniguruma engine, which Ruby also uses.




回答2:


Well this is odd. On regex101.com with it set to pcre, I have a substitution that works perfectly. Yet in sublime text 3, it does not.

try the following on the site and in ST3:

regex find: (testing.*)(0\.001\;)

replace: $10.00;

test text:
//ActionList = testing { Name = "foo";  On = 0.001; Off = 1;    v = "tester";};


来源:https://stackoverflow.com/questions/35343933/type-of-regex-used-by-sublime-text-3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!