rjahrman has asked for the wisdom of the Perl Monks concerning the following question:
I am searching to see if $string contains a substring, let's say "P100". However, I also want it to match to "P-100" and "P 100", or even "P1 00". The P100 is a variable; right now I have "if ($string =~ /\Q$model\E/)", so whatever I do needs to be programmatic . . . any ideas?
Thanks for the help.
Thanks for the help.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Finding a _Similar_ Substring? (Fuzzy Searching?)
by duff (Parson) on May 21, 2004 at 02:35 UTC | |
Re: Finding a _Similar_ Substring? (Fuzzy Searching?)
by BUU (Prior) on May 21, 2004 at 02:52 UTC | |
by hv (Prior) on May 21, 2004 at 03:04 UTC | |
by TomDLux (Vicar) on May 21, 2004 at 03:14 UTC | |
Re: Finding a _Similar_ Substring? (Fuzzy Searching?)
by BrowserUk (Patriarch) on May 21, 2004 at 03:21 UTC | |
by rjahrman (Scribe) on May 21, 2004 at 04:03 UTC | |
Re: Finding a _Similar_ Substring? (Fuzzy Searching?)
by ambrus (Abbot) on May 21, 2004 at 11:47 UTC |
Back to
Seekers of Perl Wisdom