Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: approximate regular expression

by Marshall (Canon)
on Mar 23, 2012 at 06:12 UTC ( [id://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.

Replies are listed 'Best First'.
Re^3: approximate regular expression
by jandrew (Chaplain) 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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://961152]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2024-04-24 20:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found