Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^8: Interpolating subroutine call in SQL INSERT INTO SELECT statement

by shadowsong (Monk)
on Sep 01, 2015 at 10:22 UTC ( #1140639=note: print w/replies, xml ) Need Help??


in reply to Re^7: Interpolating subroutine call in SQL INSERT INTO SELECT statement
in thread Interpolating subroutine call in SQL INSERT INTO SELECT statement

poj,

I just managed to get the YAPE::Regex::Explain module downloaded and installed via cpanm (turned out I had some firewall/proxy issues to resolve). This is an awesome module and I'll definitely be using it more in future.

Question: waaayy back when I did compiler design, we used a tool; a lexical analyzer generator called JLex (which was a Java implementation of Lex) wherein we leveraged its built in scanner to generate tokens from an input stream. Now, the documentation for it said we generally get better performance by building specification for tokens using the longest possible RegExps. So, when matching a particular expression the more of the pattern we can provide, the better. Suffice to say instead of providing:

(amp)|(lt)|(gt);

We ought to provide:

(amp;)|(lt;)|(gt;)

What are your thoughts on this? I'm not all that well versed with Perl (or how its RegExp engine functions) so any tips would be most appreciated.

Thanks
shadowsong

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1140639]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (5)
As of 2019-05-26 20:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you enjoy 3D movies?



    Results (153 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!