Dear Pundits,
We get feed from our merchants and we will have to match their product name with the names maintained in our DB. The problem is the data that we get from the merchants don't follow a given pattern. This poses a major issue.

For example, name of one product in our DB is
Compaq Presario P440 L100 PSLA0L00U00E.

The feed from merchants are given below:
Compaq Presario Laptop Model No P440 L100 Series (PSLA0L-00U00E)
Compaq Presario Laptop P440 L100 Series PSLA0L 00U00E
Compaq Presario Laptop Model PSLA 0L00U00E
Compaq Presario 440 Laptop Model No-PSLA 0L00U00

As you can see the feed contains different names for the same product model. And this involves lot of manual work for us. So we decided to maintain our DB differently i.e.
a. each word will be maintained separately.
b. And if a word contains both number and character then character will be separated from number and both will be maintained separately. So the product given in the example, Compaq Presario P440 L100 PSLA0L00U00E, will be maintained as

1. Compaq
2. Presario
3. P
4. 440
5. L
6. 100
7. PSLA
8. 0
9. L
10. 00
11. U
12. 00
13. E

As you can see when we search for the 3rd word which is 'P', against the name provided by the merchant, it gets matched with the p in the 1st word 'Compaq' and so on. Require your help in solving this problem.

Thanks

In reply to Help required in RE strategy by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.