Reputation: 29
Need some help in Notepad++
Example how it looks at the moment
http://www.test.com/doc/rat.rar">rat.rar
http://www.test.com/down/ung.rar">ung.rar
http://www.test.com/read/add.rar">add.rar
......
How I want it (just remove after ">....rar)
http://www.test.com/doc/rat.rar
http://www.test.com/down/ung.rar
http://www.test.com/read/add.rar
Its a list about 1000 lines. So help would be nice
Upvotes: 1
Views: 929
Reputation: 344517
Use the following expression:
">[^.]+\.rar
Explanation:
"> # literal `"` followed by literal `>`
[^.]+ # any character that is not a `.`, repeated at least once
\. # literal `.` character
rar # literal string `rar`
">.*
will work. This is true, because Notepad++ doesn't appear to support multi-line regular expressions, even with [\s\S]+
. Either way will work so it's personal preference. The regex I gave in this answer is very verbose and would reduce the likelihood of false positives. ">.*
, on the other hand, is shorter.
Upvotes: 1
Reputation: 52769
Use -
Find What : (.*)">(.*)
Replace With : \1
And check Regular expression
option at the bottom of the dialog.
Upvotes: 0
Reputation: 8994
Flick the "regular expression" radio button and then use this for your FIND:
">[a-z]+\.[a-z]+
Then just put empty space for your REPLACE and replace all.
Upvotes: 0
Reputation: 24236
If you put this in find ".*
and nothing in replace, that should do what you're looking for.
Remember to check that you've got regex selected at the bottom of the replace box.
Upvotes: 0
Reputation: 28316
Your search string should be ">.+\.rar
, and you can just blank out the replace box. This should do the job.
Also, check that you've got regex selected at the bottom of the replace box ;)
Upvotes: 0