Regex replace pattern matching

SyntaxEditor for Windows Forms Forum

Posted 14 years ago by Marianne
Avatar
Had posted this before but not sure if it was on this forum or the previous one. Would like to see the regex Find/Replace accept a pattern match in the replace field. As it is now, the replace feature (if using regex) is of only limited use.

As a simple example, if I want to change all variable dimensioning from vb to c#, e.g.

Dim x as string

to:

string x

Normally I would do the find like so:
Dim\s+(\w+)\s+as\s+(\w+)

and the replace would be as simple as:
$3 $2

$1 represents the full capture, and $2, $3, etc. is whatever is captured by the parentheses. Since the replace feature doesn't support what is captured by the find, these types of tasks are impossible. Is it possible to add this support to the find/replace feature? Thanks.

------------------------------- Marianne

Comments (2)

Posted 14 years ago by Boyd - Automated Software Testing Consultant / Developer, Patterson Consulting, LLC
Avatar
I agree. This would be a great feature to complete the regex find/replace capabilities.
Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Yes we have this on our TODO list. Thanks for the suggestion.


Actipro Software Support

The latest build of this product (v2018.1 build 0341) was released 3 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.