简体   繁体   English

使用C ++功能在系统路径中进行模式匹配

[英]Pattern matching in system path using C++ functionalities

I am working on Installation of particular Qt based Windows GUI application, which needs DLLs to be placed in the PATH system environment variable. 我正在研究基于Qt的特定Windows GUI应用程序的安装,该应用程序需要将DLL放入PATH系统环境变量中。 For placing I could somehow manage to append Installation_path to PATH . 为了放置,我可以设法将Installation_path附加到PATH But while uninstallation of my application I want to search for where my installation path is and then I've to remove those and put normal path as usually without modifying it. 但是,在卸载我的应用程序时,我想搜索安装路径在哪里,然后必须删除它们并照常放置普通路径,而无需对其进行修改。 Is a regex my companion or any other way in doing this? 正则表达式是我的伴侣还是其他方式?

PS I cannot use boost lib. PS我不能使用boost lib。

You don't need a regex, all you need to do is locate a substring, case-insensitive. 您不需要正则表达式,只需要做的是找到一个不区分大小写的子字符串。 Since you have Qt, use indexOf 由于您有Qt,请使用indexOf

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

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