Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
The stupid question is the question not asked
 
PerlMonks  

Re^2: Slow Regex - How to Optimize

by Anonymous Monk
on Aug 30, 2005 at 19:16 UTC ( [id://487978]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Re: Slow Regex - How to Optimize
in thread Slow Regex - How to Optimize

Notice that your code has a subtle bug.
Even if he is running the code through CPP first (to strip out comments, expand macros, rejoin lines), he still has plenty of corner cases to worry about (strings, fucntion pointers, etc)...
#define p printf int mai\ n/*this is a comment: main()*/(int argc, char **argv) { int (*f)(int, char **) = &main; p("hello world: main()\n"); if(argc>0) f((argc-1),argv); }

Replies are listed 'Best First'.
Re^3: Slow Regex - How to Optimize
by Anonymous Monk on Aug 30, 2005 at 19:30 UTC
    Oh, and don't forget that [^a-zA-Z] matches "(" and that C identifiers can have digits and underscores...
    _foo2bar((4),2);

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://487978]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.