Notepad++ how to only keep lines with certain format -


i have large text file, text inside it.

every line has different text, or format.

i need keep lines format "text1:text2" , discard rest.

for example, have 9 lines:

  1. 91.216.3.125:8085
  2. 141.101.132.98:8085
  3. text messaging, or texting, act of composing , sending
  4. asd1:bbc2
  5. qedrt2:b32sv
  6. electronic messages, typic
  7. short message service (sms). i
  8. yugiias:tugida2
  9. nhcgdw:idwune

i need 4, 5, 8, 9 lines save, else has deleted.

desired output:

  1. asd1:bbc2
  2. qedrt2:b32sv
  3. yugiias:tugida2
  4. nhcgdw:idwune

the following regular expression finds lines match desired lines. assuming example input representative don't need more complex this:

([a-z].*):(.*) 

you can find lines want , copy them out file. if there smallish number of matching lines amongst 'many' lines in original file time effective compared trying build , run more complex answer.

is workable answer? or want write script it? preference language want script in?

there large number of ways achieve seem want may need supply more constraints and/or expectations people more effectively.


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -