Management comes up with these contradictory requirements all the time :)

But, really, this just looks like they mean that there must be SOMETHING after the X, but it could be a, b, OR c, or more than one of those, in relative order.

So, Xa is ok, so is Xb, Xc, Xab, Xac, Xbc, and Xabc. Just X by itself is invalid - it's not allowed to be empty.

I seem to recall such types of ambiguity to be common both among teachers and managers. Something about not having to implement it themselves combined with "I know what I mean. Why don't you?".

And, based on my tests,

should do the job. But if the OP doesn't understand why while trying to hand it in as their own work, they'll find that they're going to get further and further behind as their course progresses.


In reply to Re^2: perl look ahead regular expression that is optional? by Tanktalus
in thread perl look ahead regular expression that is optional? by bigsipper

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.