Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8069071
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T12:53:53+00:00 2026-06-05T12:53:53+00:00

I recently answered a question, that in its comments section picked up a query

  • 0

I recently answered a question, that in its comments section picked up a query from another user that I couldn’t answer.

Searching for a product even if code is misspelled

Given a fuzzy search parameter which will use Regular Expressions to filter a ‘large’ datasource, how would you go about assigning a value for ‘relevance’ or ‘best match’?

The filter will work correctly but I have no idea how to adapt it in such a way that you can identify what values are closest to the provided search string, and what values are farthest away.

Closest in this case would be an exact match to the string (assume the ‘+’ character doesn’t exist, anything that still matches is closest). Farthest, i.e. Worst, match would be exactly the opposite, largest number of non-matching characters.

For the sake of avoiding arguments, lets assume the fuzzy search being used is using a mix of ‘+’ and ‘*’ in the search patter. X+HG*UPO+Z* or something along those lines.

The goal is to avoid using a string length comparison. In the question I answered, the data was almost guaranteed to always be the same length anyway.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T12:53:56+00:00Added an answer on June 5, 2026 at 12:53 pm

    You could compute the Levenshtein distance, or something similar. Approximate string matching on Wikipedia might be of some help.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I recently answered this question how-to-call-user-defined-function-in-order-to-use-with-select-group-by-order-by My answer was to use an inline view
I was asked this question in a job interview recently. I answered that I
I recently answered a question with a proposition that the asker should improve his
Recently here an R question was answered by mrdwab that used a regex that
I recently posted a question which was answered by Bryan Watts, regarding generic repository
Recently, I asked (and answered) a question on StackOverflow about why a unit test
I recently answered a question with an attempt at writing a quicksort function in
I have a question that may have been answered over 9000 times before but
I recently asked a question (and had it answered) here: jQuery Load JSON I
This task has already been asked/answered, but I recently had a job interview that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.