You must be registered to post a reply. Click here to register.
T O P I C R E V I E W
Martin Hohl
Posted - Oct 13 2017 : 08:57:13 AMSupport 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.
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
1 L A T E S T R E P L I E S (Newest First)
accord
Posted - Oct 13 2017 : 9:11:33 PM We are considering to implement something like this, at some point: