I have an online web application with a top menu tree for opening different widgets for performing different tasks. As the app grows more powerful, that tree has become large and difficult to navigate. I've implemented a search feature, where users can just type the menu name or part of it and I use regex to find all items in the menu tree that match what the user types. My regex allows for partial words and swapped words, and also limits the search to the beginning of each word. The one thing it doesn't allow for is misspelled words. I understand that to allow for misspelled words it's best not to use regex and to use a string distance method instead, but I still want to allow for the partial word and swapped words. Is this possible?
For example, right now, if a menu item is "Finance Rate Maintenance", any of the following would match to that menu item: "finance", "finance ra", "rate finance" etc.. "inance rate" would not match because "inance" does not appear at the beginning of any of the words for that menu item. I want searches like "fnane rate" and "rate maintainance" which are slightly misspelled to match.