Does regex replace support if condition find and replace
How to find and replace text where if in my FIND regex $1 group had matches then REPLACE regex match to $2 else $3
eg:
FIND
(a?)(\w)(\w)
OCCURRENCE
abc
REPLACE
{mine unknown that I am looking for} something like
if($1.matches.length>1) return $2; else return $3;
EFFECT
b
Please sign in to leave a comment.
No, it's not possible.
Related feature request: https://youtrack.jetbrains.com/issue/IDEA-70478