ok - now I understand. I'm thinking this is going to get a little complicated with the possible differences in the @ID values. It may or may not have parenthesis. Could have only closing parenthesis, so it has to be able to match all different occurrences.

I tried adding in opening/closing parenthesis and it still won't match. I'm not a REGEX expert.

if ( $tag =~ m/<endnote id=((\d*)([[:alpha:]]*))>/ ) {

Input could be:

<endnote id=(1)>Text...</endnote>
<endnote id=(2)>Text...</endnote>

<endnote id=1)>Text...</endnote>
<endnote id=2)>Text...</endnote>

<endnote id=1.>Text...</endnote>
<endnote id=2.>Text...</endnote>

<endnote id=1a>Text...</endnote>
<endnote id=2cb>Text...</endnote>

<endnote id=a.1>Text...</endnote>
<endnote id=a.2>Text...</endnote>

etc...


In reply to Re^4: read/write delete duplicates/sort PROBLEM! - Use of uninitialized value in sprintf by VladP
in thread read/write delete duplicates/sort PROBLEM! - Use of uninitialized value in sprintf by VladP

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.