I'm not too sure how to correctly explain this, but I'll try my best. I am using ajax to filter through certain posts based on a text input field. This then lists all posts including the letters and numbers a user input. Pretty basic stuff.
Now, my client wants to add a "Smart Search" feature. Basically, if a user enters "0123" they want it to list all posts with titles that include "0123" as well as "o123". The same thing needs to happen with "s" and "5". So if a user types "1234s" it will list all posts that include "1234s" and "12345". Is there anyway to do this?
Here is what I have so far, numberchar is the name of the text input
$categoryparentfilter = "SELECT ID FROM `wp_posts` WHERE `post_title` LIKE '".trim($_POST['numberchar'])."%' order by ID desc";