Reputation: 1288
I have file which contain 18k lines, with links and rondom ID codes which looks like this:
"http://arduino.cc/en/Main/ArduinoBoardNano
SC09661
http://arduino.cc/en/Main/ArduinoBoardUno
http://www.farnell.com/datasheets/1639172.pdf
SC09670
http://arduino.cc/en/Main/ArduinoBoardUno
SC09665
http://arduino.cc/en/Main/ArduinoEthernetShield
SC09662
http://arduino.cc/en/Main/ArduinoXbeeShield
CS23020
http://bcove.me/zypzpy2q
SC09147
http://cache.national.com/ds/LM/LM134.pdf
SC08546
http://cache.national.com/ds/LM/LM2574.pdf
SC08540
http://cache.national.com/ds/LM/LM2576.pdf"
I need to remove from this files all those ID codes (SC08540,SC09662,...) and links which not ends with .pdf, I know its posible with Notepad++ but I dont know exacly how, maybe someone could help me?
Upvotes: 2
Views: 316
Reputation: 77904
Find what: ^((?!.pdf).)+$
Replace with: leave empty
and run Replace All
Im sure you don't need to run [SC]+[0-9]+
to clear ID codes since 1st regex will catch them
After, use ^\r?\n?$
to clear from empty lines
Upvotes: 2