capslock - Deleting everything between [ ] in a list -


im using notepad++ text file

i have list of 500 individual lines , consist of:

12 asdfdfsdfz adf [sgh] 1 sdasd fsdfsdf [sgv] 

and on 500 times.

i wish remove in between brackets , brackets

any helpful in advanced

use unix tool called sed , match them regex, and have 2 problems.

sed 's/\[[a-z]*\]//g' your.file > output.txt 

do note delete them if there's nothing uppercase letters between brackets, i.e. not delete [abcd]

strictly speaking, above command delete

  • an opening bracket [, followed by
  • zero or more uppercase letters, , followed by
  • a closing bracket ].

Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -