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

Re^2: approximate regular expression

by Marshall (Prior)
on Mar 23, 2012 at 06:12 UTC ( #961152=note: print w/ replies, xml ) Need Help??


in reply to Re: approximate regular expression
in thread approximate regular expression

Yes, split() is certainly "brute force".
If you have bench-marked this, you know that this is a very "expensive operation".
@array = split (//,$some_var) is super "expensive" and your code does it many times.

Going "with the flow" of the language is (usually) going to execute faster and in general "be better", meaning easier to understand.


Comment on Re^2: approximate regular expression
Re^3: approximate regular expression
by jandrew (Hermit) on Mar 23, 2012 at 22:00 UTC

    Marshall thank you for your feedback

    Honestly I don't have a good handle on what perl "with the flow" really means. I guess I was responding to jrblas's request regarding fuzzy regex's. And by that I mean that fuzzy regex's mostly land in the TODO bucket of the regex wizards from what I have read. I do say that as a regex weakling so there may be something out there that I don't know about. Specifically Marpa seems to promise some alternatives but that is even farther beyond my current grasp.

    With that said I have to confess to laziness in calculating the match score. As a guess the original question appears to fall in the bio-perl realm which upon further study would also benefit from regex Look-Around add-ons. So I offer the following in penance.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (16)
As of 2014-09-23 17:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (234 votes), past polls