In Notepad++, removing beginning text from each line?
I have some junk before each line and the text I want
eernnawer love.pdf
nawewera man.pdf
awettt sup.pdf
I would like to do a find and replace to g开发者_运维技巧et
love.pdf
man.pdf
sup.pdf
How can I do this? Thanks
- Ctrl+H to open the search and replace dialog
- Activate Regular Expressions as search mode, check Wrap around
- Find:
.* (.*\.pdf)$
- Replace:
\1
- Click Replace All
\1
is the text found by the expression in the (first) pair of parentheses. If you would want to remove the trailing text, you could use (.*) .*\.pdf$
.
You can do ctrl+R click the box for allowing RegEx Insert ^[^\s]+\s into the top box Then Find Then Replace Rest
You could find ^[^ ]*
and replace it with nothing (notice the space at the end of the regex).
In Find and Replace in regular expression mode, find for .*
(note, with a space in the end ) and replace with blank.
精彩评论