Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Regex is still a bit of an alien beast to me so forgive me if this sounds really simpleton. According to Camel, Perl uses a similar mechanism to produce $1, $2, and so on, so you also pay a price for each pattern that contains capturing parantheses.

Is the performance punishment the same as $&, $`, $'. Where once I use a capturing parantheses to produce a $1, $2, etc. Then that performance penalty now exists for all regex's regardless of whether or not I use capturing parantheses because I used capturing parantheses elswhere?

edit:You know what? My poor addled brain finally put three and two together after I read each word on that page in Camel over and realized that they make whole paragraphs. The performance hit occurs for capturing paranthesis, but it's limited in scope to the specific regex in question. It doesn't incur the same global penalty as $&, $`, $' does. I think I'll go sleep on the floor now.

----
Is it fair to stick a link to my site here?

Thanks for you patience.


In reply to Re: Naughty Regular Expressions and mod_perl by SavannahLion
in thread Naughty Regular Expressions and mod_perl by Ovid

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 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?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2024-04-25 10:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found