MrPink1138
Programmer
I'm trying to write a search page and having the infamous SQL Server Ignored words problem. Basically what I want to do is to filter out all of the ignored words from what my user entered.
To that end, I have an array which contains all of the SQL ignored words.
I have a 2nd arary which contains my user's search which is basically taking whatever they enter and using a regex string to split it into an array.
What I need to do is loop through the user input array and check to see if any of the words are in the ignored words array. If so, remove them (or we could populate a 3rd "clean" array).
Is there an effecient way of doing this?
I'm thinking I could use some nested loops to check each word in the user array against each word in the ignored words array but I'm wondering if there's a better way.
Any ideas? Thanks in advance
To that end, I have an array which contains all of the SQL ignored words.
I have a 2nd arary which contains my user's search which is basically taking whatever they enter and using a regex string to split it into an array.
What I need to do is loop through the user input array and check to see if any of the words are in the ignored words array. If so, remove them (or we could populate a 3rd "clean" array).
Is there an effecient way of doing this?
I'm thinking I could use some nested loops to check each word in the user array against each word in the ignored words array but I'm wondering if there's a better way.
Any ideas? Thanks in advance