Yes, (
)
captures a group. You can use it again with $i
where i
is the i’th capture group.
So:
search:
(\w+\.someMethod\(\))
replace:
((TypeName)$1)
Hint: Ctrl + Space in the textboxes gives you all kinds of suggestions for regular expression writing.
More Related Contents:
- Tempered Greedy Token – What is different about placing the dot before the negative lookahead?
- Replace single backslash in R
- What flavor of Regex does Visual Studio Code use?
- powershell: how to escape all regex characters from a string
- Regular expression search replace in Sublime Text 2
- how to use a regular expression to extract json fields?
- How do I perform a Perl substitution on a string while keeping the original?
- Replace a word with multiple lines using sed?
- How to search and replace with a counter-based expression in Vim?
- Eliminate newlines in google app script using regex
- What’s the best tool to find and replace regular expressions over multiple files?
- How to replace only part of found text?
- Regular expression to remove special characters in JSTL tags
- How to use different separators (/ , |) in a regular expression
- How does the () and [] come into play with regex?
- What is this pattern “\\s*\\^++\\s*” used for? [duplicate]
- How do (*SKIP) or (*F) work on regex?
- Regular Expression to find a string included between two characters while EXCLUDING the delimiters
- Difference between * and + regex
- How to capture multiple repeated groups?
- Regular expression to enforce complex passwords, matching 3 out of 4 rules
- Regular expression for a string that does not start with a sequence
- Regex: Specify “space or start of string” and “space or end of string”
- How to replace last occurrence of characters in a string using javascript
- Regex to match all permutations of {1,2,3,4} without repetition
- Negate characters in Regular Expression [closed]
- Have HTML5’s a inputs pattern attribute ignore case
- JSLint reports “Insecure ^” for my regex — what does that mean?
- Regex not working in Angular Validators.pattern() while working in online regex testers
- Regexp for subdomain