Single quotes are technically a valid character in email addresses

For those of you who think this is just pedantry I can assure you that it is not.

Many years ago, when defensive programming was less widespread than now, a customer of $WORK did indeed have such an email address. It followed the pattern of jack.o'malley@bigcorp.com and caused no end of trouble for various systems which poor, hapless Jack was required to use. It even showed up one or two areas of $WORK's systems where such a potential injection was either mismanaged or misreported. These days Jack should have no trouble with systems from respsonsible coders but there are still plenty of slapdash operators out there who will struggle with this, even now.

If you persist in using home-grown regexen to parse email addresses (or HTML or XML or SQL or ...) then you should be aware that sooner or later it will come back to bite you.


🦛


In reply to Re^2: Splitting in while loop by hippo
in thread Splitting in while loop by tel2

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.