Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Feature Requests
 Add support for regex replace in VA snippet editor
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Martin Hohl
Starting Member

Germany
1 Posts

Posted - Oct 13 2017 :  08:57:13 AM  Show Profile  Reply with Quote
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

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Oct 13 2017 :  9:11:33 PM  Show Profile  Reply with Quote
We are considering to implement something like this, at some point:

case=86348
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000