Martin Hohl
Starting Member
Germany
1 Posts |
Posted - Oct 13 2017 : 08:57:13 AM
|
Support for regex replace of selected text or other keyword items in VA snippet editor
Currently the VA editor seems to allow only replacement by keywords like $selected$, $SymbolName$ etc. At least until now I didn't find a way how to replace such items by regular expressions, e.g.
$RegexReplace$($selected$,"ECMASCript_RegexPattern","ReplacementText")
where "ECMASCript_RegexPattern" is a regular expression pattern fulfilling the standard as explained in http://www.cplusplus.com/reference/regex/ECMAScript/ and "ReplacementText" may contain text and references to match groups as explained in http://www.cplusplus.com/reference/regex/regex_replace/ for the 'fmt' parameter in a call like std::regex_replace(orig_string,std::regex(regex_pattern,regex_constants::ECMAScript),fmt);
Please add support for regex replace of selected text or other keyword items in VA snippet editor, because it would allow extremly powerful customizable refactoring. (Of couse exceptions like regex_error in C++ should be caught and the message text coming from regex_error exception should be displayed, when user enters a defective regex pattern, in order to support correction of the pattern).
Regards, Martin
|
Martin Hohl SW Development Engineer [C++, C#] |
Edited by - Martin Hohl on Oct 13 2017 11:08:45 AM |
|