Take the 2-minute tour ×

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 get


How can I do this? Thanks

share|improve this question
add comment

4 Answers

  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$.

share|improve this answer
Thanks! Perfect! –  user964946 Sep 26 '11 at 21:05
add comment

You can do ctrl+R click the box for allowing RegEx Insert ^[^\s]+\s into the top box Then Find Then Replace Rest

share|improve this answer
add comment

You could find ^[^ ]* and replace it with nothing (notice the space at the end of the regex).

share|improve this answer
add comment

In Find and Replace in regular expression mode, find for .* (note, with a space in the end ) and replace with blank.

share|improve this answer
add comment

Your Answer


