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:
- 91.216.3.125:8085
- 141.101.132.98:8085
- text messaging, or texting, act of composing , sending
- asd1:bbc2
- qedrt2:b32sv
- electronic messages, typic
- short message service (sms). i
- yugiias:tugida2
- nhcgdw:idwune
i need 4, 5, 8, 9 lines save, else has deleted.
desired output:
- asd1:bbc2
- qedrt2:b32sv
- yugiias:tugida2
- 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
Post a Comment