Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Re: Regexp::Approx - Use fuzzy regular expressions

by diotalevi (Canon)
on Nov 12, 2003 at 14:32 UTC ( [id://306532]=note: print w/replies, xml ) Need Help??


in reply to Re: Regexp::Approx - Use fuzzy regular expressions
in thread Regexp::Approx - Use fuzzy regular expressions

Drat. I musta screwed up the failure case while working on the send/recv functions. It did work correctly before. Fixes to come in an hour or so.

Got it. The code was testing the return value of print() instead of the actual match response. When I added the general function wrapper I forgot to put a `return _read_msg()` in. (Again) it works correctly for me using your sample script.

Replies are listed 'Best First'.
Re: Re: Re: Regexp::Approx - Use fuzzy regular expressions
by Anonymous Monk on Nov 12, 2003 at 15:36 UTC

    There seems to be remaining problems, for example:

    #!/usr/bin/perl -w use strict; use lib '.'; use Regexp::Approx 'fuzzy_qr'; use re 'eval'; while(<DATA>) { chomp; print "Using '$_' as fuzzy component:\n"; my $fuzzy_part = fuzzy_qr( $_ ); my $rx = qr/($fuzzy_part)/; if ( "5678 DELAWARE AVENUE AOT 123" =~ /$rx/ ) { print "\tRX Match: $1\n"; } } __END__ APT A XXX ^%@#!( fuzzy matches anything? x #### output: Using 'APT' as fuzzy component: RX Match: AO Using 'A' as fuzzy component: RX Match: 5 Using 'XXX' as fuzzy component: amatch: $_ is undefined: what are you matching? Compilation failed in require at xxx.pl line 4, <GEN0> line 51. BEGIN failed--compilation aborted at xxx.pl line 4, <GEN0> line 51. Using '^%@#!(' as fuzzy component: Broken pipe ### platform: $ perl -v This is perl, v5.8.0 built for i686-linux

Log In?
Username:
Password:

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

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

    No recent polls found