Need help deleting any text between other text
-
The scenario is this: I have thousands of lines that look like this:
<Path>C:\random name\random name.zip<path>
And i need it to be
<Path>C:\random name.zip<path>
Basically i need to delete the duplicated name in every line because those files are not in subfolders of the same name anymore.
Thanks in advance!
—moderator added code markdown around text; please don’t forget to use the
</>
button to mark example text as “code” so that characters don’t get changed by the forum -
FIND WHAT =
\\(.*?)\\(\1)
REPLACE WITH =\\$1
SEARCH MODE = Regular ExpressionExplanation
FIND:\\
is a literal backslash(.*?)
says grab text and put it in group1\\
until it hits the next backslash(\1)
says match the same text that was in group1
REPLACE:
$1
refers to the contents of group1
----
Useful References
-
Thank you!