Replace Pioneer Home
All Examples
Free Download
all
Advanced search and replace
Replace text in multiple files
Regular expression replace
Batch file rename
Batch download
Text file parser
Text file splitter
Html text generator
Search replace binary
Random word generator
Count and statistics
Character encoding
Bin Hex Oct Dec converter
Text generator
Text sort
Text merge
Text data calculation
RSS: Replace Pioneer Examples
224.Advanced search and replace -- How to remove/delete all text enclosed by a pair of square bracket []?
User:
editor -- 2008-07-15
<< 223
225 >>
Hits:
589
Type:
Advanced search and replace
Search all
Advanced search and replace
examples
Description:
How to remove all text enclosed by a pair of square bracket []?
Input Sample:
sentence1[comments1]
sentence2[comments2]
...
Output Sample:
sentence1
sentence2
...
Answer:
Hint: You need to
Download and install "Replace Pioneer"
on windows platform to finish following steps.
1. ctrl-o open the text file
2. ctrl-h open 'Replace' dialog
in 'Replace' page:
* set 'Search for pattern' to:
\[.*?\]
* set 'Replace with pattern' to nothing
3. Click 'Replace', done!
Note:
\[.*?\] is a regular expression, will match any characters enclosed by a pair of square bracket.
Download Script:
scripts/224.rst.zip
Screenshot 1: Replace_Window
Similar Examples:
How to batch remove all the text that enclosed by a pair of parenthesis?
(67%)
How to remove/delete the text from the '#' to the end in each line?
(61%)
How to remove/delete all lines with even line number?
(60%)
How to remove/delete all lines with even line number?
(60%)
How to remove/delete all text between '1:' and 'user:'?
(58%)
How to extract all text enclosed by H1 tag from multiple html files?
(56%)
How to remove/delete all lines with three symbol '='?
(56%)
How to remove/delete following text containing various time?
(56%)
Check Demo of
Advanced search and replace
Keywords:
bracket
square
enclose
characters
regular expression
remove all text
delete
delet
expression
dele
replace enclosed expression
enclosed replace regular expression
enclosed text search and replace
match all characters
remove characters
all characters
replace with pattern regular expression
text to regular expression