J
J
JZorkiy2020-12-12 20:53:33
Regular Expressions
JZorkiy, 2020-12-12 20:53:33

How to replace part of a string in the whole project by regular expression?

The essence is that you need to find the whole line from the beginning to the end of the view:

public function f1 (p1) {
  private function f2 (p2) {
  function f3 (p3) {

and replace all function parameters with (x, y), for example.

I explain.
Finding such lines is not a problem. The problem is to replace a substring in them and do it not consistently by poking at each replacement, but at once in the whole project in a swoop through "Find in Folder".
That is, using regular expressions, I can take the desired part of the string in brackets and refer to it through "\1", but how can this be used in ST3? Or in some other way?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dollar, 2020-12-12
@dollar

Search for: (неизменное)заменяемое(неизменное)
Replace: \1замена\2
Something like this.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question