Results 1 to 1 of 1
  1. #1
    Join Date
    Nov 2010

    Unanswered: Help matching best match (using REGEXP)


    I have a table full of regexes (like the one bellow)


    I need a query to retrieve the part_match of the BEST match for 'FF2-0F4J-YJKNC'

    I tried going 'FF2-0F4J-YJKNC' regexp match_match ORDER BY length( part_match ) DESC and grab the first row returned, but will not work because this will return row 3 first but the best match is row

    Does any one know how to solve this problem by only using a MYSQL query?

    Obviously this is an example, the actual table is huge and I need something works for any input

    Thank you !!
    Last edited by mc_line; 11-24-10 at 15:53.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts