Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
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":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2021-10-28 08:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (96 votes). Check out past polls.

    Notices?