Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: searching for a string w/ a * in any single position?

by blokhead (Monsignor)
on Oct 05, 2007 at 22:59 UTC ( [id://642998]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub hamming {
      my ($x1, $x2) = @_;
    ...
    1
    -1
    3
    
  2. or download this
    # untested
    my $target = "abcdef";
    ...
    
    my $len = length $target;
    my $qr  = qr/ \b(\w{$target})\b (?(??{ hamming($target,$1) < $distance
    + }) | (?!))  /x
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2024-03-28 11:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found