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
510.Regular expression replace -- How to remove all html tags that enclose nothing or " " ?
User:
Terry -- 2010-05-15
<< 509
511 >>
Hits:
3373
Type:
Regular expression replace
Search all
Regular expression replace
examples
Description:
how to replace 'nothing' or between matched tags with empty in a long text?
Input Sample:
<tag1><tag2><tag3></tag3><tag3>abc</tag3></tag2><tag2><tag3>ccc</tag3><tag3> </tag3></tag2></tag1>...
Output Sample:
<tag1><tag2><tag3>abc</tag3></tag2><tag2><tag3>ccc</tag3></tag2></tag1>...
Answer:
Hint: You need to
Download and install "Replace Pioneer"
on windows platform to finish following steps.
1. ctrl-o open the text/html files that has tags.
2. ctrl-h open 'replace' window
* in 'search for pattern', enter:
<([\d\w]+)>( )?\1>
* enter nothing in 'replace with pattern'
3. click 'Replace', done!
4. ctrl-s save to file.
Similar Examples:
How to remove nested html tags that only enclose blank tags or ?
(78%)
How to remove all question mark that enclosed by title tags?
(61%)
How to remove all text that include variable strings?
(59%)
How to remove all line breaks that come after the backslash?
(58%)
How to remove all lines that are not ended with word "ok" or "done"?
(58%)
How to batch remove all the text that enclosed by a pair of parenthesis?
(58%)
How to remove all the lines that do not contain any of words in a list?
(57%)
How to remove all lines that contains more than one word?
(57%)
Check Demo of
Regular expression replace
Keywords:
empty
remove all html
tags
enclose
html tag
tag
between
regular expression
expression
remove all
remove empty
replace all html tags with nothing
empty text files
replace expression between tags
remove html tags
search replace between tags
text between tags
remove tags