Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 Add support for regex replace in VA snippet editor

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
Martin Hohl 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



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:

case=86348

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000