I am making a basic craigslist type website with a search function. There is a field where you can enter what you think the name of the product might be and my search function is supposed to find names of products that match.
so for example a user can enter:
"squat rack"
"squatrack"
"sqaut rack"
"squat rac"
"scuat rack"
"squart rac" (you know, in case of a typo)
and hopefull what will show up in the serach results is:
"squat rack"
"some other kind of rack"
"squat machine"
and things that are similar.
I used "/<name of product>/" as my search criteria and it pulls up everything. Hopefully the user would put other search criteria to narrow it down but right now I'm looking for a regex that can do "close enough" type matches. Myabe even use a for loop or split it up into sections and do multiple searches I'd be OK with. I'm very new to regex and I find it to be difficult, so bear with me.