Answer the question
In order to leave comments, you need to log in
How to remove part of text using regular expressions?
There are lists, in one list there are more than 2000 lines. Lists are presented in the following form:
- /(///(111(222)333)\\\?) @ /(///(111(222)333)\\\?) @ /(///(111(222)333)\\\?)
- /(///(111(22)333)\\\?) @ /(///(111(22)333)\\\?) @ /(///(111(22)333)\\\?)
- 111(222)333 @ /(///(111(222)333)\\\?) @ /(///(111(222)333)\\\?)
- 111(22)333 @ /(///(111(22)333)\\\?) @ /(///(111(22)333)\\\?)
Answer the question
In order to leave comments, you need to log in
sed
but in general, for clarity, the files would be given, it’s hard to watch without a real example.
You can use sed as ShamblerR pointed out .
But you can do it right in Sublime via replace
To delete, you need to mark those honors that need to be saved using brackets r'(save) delete (save)'.
And already in the replacement field, write something like
\1 New text \2
(or $1 $2)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question