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
Post a Comment