Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: Slow Regex - How to Optimize

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


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); }


Comment on Re^2: Slow Regex - How to Optimize
Download Code
Re^3: Slow Regex - How to Optimize
by Anonymous Monk on Aug 30, 2005 at 23: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
Node Status?
node history
Node Type: note [id://487978]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2014-11-27 05:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (180 votes), past polls