Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^4: Can KMP be used to find the longest common subsequence? (ugh)

by bart (Canon)
on Dec 12, 2007 at 11:46 UTC ( [id://656596]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    print 'xxxxaxxxxbxxxx' =~ /a(?>.*?)b/ ? 'match' : 'fail';
    
  2. or download this
    $string = 'abcd';
    $regex = '^' . join '', map "[^$_]*$_", map quotemeta, split //, $stri
    +ng;
    ...
    if($sequence =~ /$regex/s) {
        printf "I found a match, at offset %d and with total length %d\n",
    + $-[1], $+[1]-$-[1];
    }
    

Log In?
Username:
Password:

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

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

    No recent polls found