#!/usr/bin/perl use strict; while (<DATA>) { if (/^\<differentiation\>/ ... /^\<\/differentiation\>/ ) { s/\<.*\>/new/g if ! ( /\<differentiation\>/ || /\<\/differenti +ation\>/ ); print; } } __DATA__ <differentiation> <differentiated-content differentiation="Emphasis3" xlink:type="simple +">Dedication</differentiated-content> </differentiation> <differentiation> <para differentiation="Emphasis3" xlink:type="simple">Dedication</para +> </differentiation>
In reply to Re: Find and replace
by bichonfrise74
in thread Find and replace
by Selvakumar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |