DB<1> $a="abcdabcd" DB<2> p $a =~ /[0-9a-f]{4|8}/ DB<3> p $a =~ /[0-9a-f]{4}/ 1 DB<4> p $a =~ /[0-9a-f]{8}/ 1

NB-the display is eating the [] square brackets up there.

lots can follow from this:
- why no error on the 1st line
- am I really the 1st ? ;-)
- whats it mean currently ? (this I can answer)

1: BRANCH(15) 2: ANYOF[0-9a-f](13) 13: EXACT <{4>(18) 15: BRANCH(18) 16: EXACT <8}>(18) 18: END(0)

thats not what I expected, wouldnt you tacitly expect perl to do something similar to what it does with {4,8} there ? or is that ambiguous ?

given the availability of \, which is needed to get literal reading of []() chars, whats the harm ?

(He baits the hook, chum the water... Dont we have some regex-monsters lurking here ?

Janitored by Corion: Added formatting, code tags, as per Writeup Formatting Tips


In reply to what means this regex? $x = qr/[0-9a-f]{4|8}/ by kidongrok

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.