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
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link or
or How to display code and escape characters
are good places to start.
|