input: <p class="normal">The majority of CA-MRSA strains are sensitive + [<a id="ch1-bid.38" href="#rch1-bid.38">38</a>,<a id="ch1-bid.38" hr +ef="#rch1-bid.39">39</a>]</span>. SXT has [<a id="ch1-bid.101" href=" +#rch1-bid.101">101</a>]</span>). SXT can be considered for use in sel +ected MRSA cases where patients are not tolerant of other, more activ +e, antibiotics.</p> <h3 class="h3t">Rifampicin</h3> ############## open(file,"<chapter01.xml")or die "the Erroer line si $!"; @filelist = <file>; $coutnline=0; $count =0; foreach(@filelist) { # print $_; $tlist= $_; if($tlist =~m/id="ch1-bid.[0-9]+/i) { #print $&."\n"; $mc_line = $&; chomp; if($mc_line =~ s/(?:\s*\b$re)+$//) { print "[$_]\n"; # print "$& test1 \n";; } else { #print "not matched \n"; push(@ovr,$_) } $coutnline++; } else { push(@overlist,$_); # print "the line is over writed \n"; $count++; } } close(file); print $coutnline."\n"; print $count; #out put needs input: <p class="normal">The majority of CA-MRSA strains are sensitive + [<a id="ch1-bid.38" href="#rch1-bid.38">38</a>,<a href="#rch1-bid.38 +">38</a>]</span>. SXT has [<a id="ch1-bid.101" href="#rch1-bid.101">1 +01</a>]</span>). SXT can be considered for use in selected MRSA cases + where patients are not tolerant of other, more active, antibiotics.< +/p> <h3 class="h3t">Rifampicin</h3>
Update
input : <p class="normal">nfection <span class="small">[<a id="ch1-bi +d.1" href="#rch1-bid.1">1</a>]</span>.</p> <p class="normal">nfection <span class="small">[<a id="ch1-bid.2" href +="#rch1-bid.2">2</a>]</span>.</p> <p class="normal">nfection <span class="small">[<a id="ch1-bid.4" href +="#rch1-bid.4">4</a>]</span>.</p> <p class="normal">nfection <span class="small">[<a id="ch1-bid.4" href +="#rch1-bid.4">4</a>]</span>.</p> ----------------------------------- output : <p class="normal">nfection <span class="small">[<a id="ch1-bi +d.1" href="#rch1-bid.1">1</a>]</span>.</p> <p class="normal">nfection <span class="small">[<a id="ch1-bid.2" href +="#rch1-bid.2">2</a>]</span>.</p> <p class="normal">nfection <span class="small">[<a id="ch1-bid.4" href +="#rch1-bid.4">4</a>]</span>.</p> <p class="normal">nfection <span class="small">[<a href="#rch1-bid.4"> +4</a>]</span>.</p> ======end don't want id="ch1-bid.4" tab. pls find

In reply to Remove find tag by tyce

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.