简体   繁体   English

替换Visual Studio的正则表达式?

[英]Replace regex for visual studio?

What could the regex be to replace all instances of NBinTree<Whatever_1>::Whatever_2 with NBinTreeWhatever_2<Whatever_1> ? 什么可以在正则表达式是替换的所有实例NBinTree<Whatever_1>::Whatever_2NBinTreeWhatever_2<Whatever_1>

I tried .NBinTree<\\1>::\\2[ ]$ for the search and NBinTree\\2<\\1> for the replace but it doesn't do anything at all. 我尝试了.NBinTree<\\1>::\\2[ ]$用于搜索,而NBinTree\\2<\\1>用于替换,但它根本不做任何事情。

Replace matches of NBinTree<(\\w+)>::(\\w+) with NBinTree$2<$1> . NBinTree<(\\w+)>::(\\w+)匹配替换为NBinTree<(\\w+)>::(\\w+) NBinTree$2<$1>

Make sure that the "Use Regular Expressions" box is checked. 确保选中“使用正则表达式”框。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM