开发者

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


  1. Ctrl+H to open the search and replace dialog
  2. Activate Regular Expressions as search mode, check Wrap around
  3. Find: .* (.*\.pdf)$
  4. Replace: \1
  5. 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜