Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

364.Regular expression replace -- How to batch remove all the text that enclosed by a pair of parenthesis?

User: editor -- 2009-12-11          << 363  365 >>
Hits: 4184
Type: Regular expression replace   
Search all Regular expression replace examples
Description:
I have some text documentations that contains some unnecessary information that enclosed by a pair of parenthesis, the content are not fixed, how to batch remove all these parenthesis enclosed text?
Input Sample:
This is to test line 1(the 1st line) 
This is to test line 2(the 2nd line) 
Output Sample:
This is to test line 1 
This is to test line 2
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. press ctrl-o and open source text file 
2. press ctrl-h to open "replace" dialog 
fill in 'Search for Pattern' like: 
 
fill nothing in 'Replace with Pattern' 
3. click 'Replace', done! 
 
Note: \(.*?\) is a format of regular expression.
Download Script:  scripts/364.rst.zip

Screenshot 1:  Replace_Window


Similar Examples:
How to remove all lines whose 4th column enclosed by a pair of parenthesis? (77%)
How to remove/delete all text enclosed by a pair of square bracket []? (67%)
How to extract all text that enclosed by <a> and <font>? (65%)
How to remove all text that include variable strings? (64%)
How to batch rename html files to the content that between a pair of h2 tags? (62%)
How to remove all question mark that enclosed by title tags? (61%)
How to extract all text that enclosed by html tag "strong"? (61%)
How to move text before first square bracket to the replace of the parenthesis? (59%)

Check Demo of Regular expression replace
Keywords:
sar  formation  parenthesis  parenth  document  fixed  nth  doc  enclose  fix  batch remove parenthesis  remove parenthesis regular expression  replace parenthesis batch  replace enclosed expression  enclosed replace regular expression  regular expression replace enclosed  remove parenthesis  how to remove the parenthesis