Hi I want to replace the same occurence of name in <bib id="CIT-Barkana-b0001">, <bib id="CIT-Barkana-b0003">

as <bib id="CIT-Barkana1-b0001">, <bib id="CIT-Barkana2-b0003">

Also for <bib id="CIT-Hawkins-b0004">, <bib id="CIT-Hawkins-b0005">, <bib id="CIT-Hawkins-b0005">

<ref-list> <bib id="CIT-Barkana-b0001"><article-title>Laser eye injuries</article +-title>. <source>Survey of Ophthalmology</source>, <volume>44</volume +>(<issue>6</issue>), <fpage>459</fpage>–<lpage>478</lpage></bib> <bib id="CIT-Baumal-b0002"><source>Free Medical Textbook</source>.</bi +b> <bib id="CIT-Barkana-b0003"><publisher-name>University of California – + Irvine</publisher-name>. <inpress>Retrieved from</bib> <bib id="CIT-Hawkins-b0004"><publisher-loc>Brookfield, VT</publisher-l +oc>: <publisher-name>Ashgate</publisher-name>.</bib> <bib id="CIT-Hawkins-b0005">http://news.yahoo.com/lasers-aimed-6-plane +s-going-nycs-laguardia-211534890.html</bib> <bib id="CIT-Hawkins-b0006"><source>St. Louis Post-Dispatch</source>.< +/bib> </ref-list>

I want to replace the first, second, third occurence of same name as "Barkana1", "Barkana2", "Barkana3" etc...

I want to replace the first, second, third occurence of same name as "Hawkins1", "Hawkins2", "Hawkins3" etc...


In reply to To replace the occurence string in perl by codewalker

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.