I am not very good with regexp so I really would like some help to achieve my goal.
When searching in my db I use an alias for specific keywords.
Here is an example
keyword tets alias test (someone have spell wrong then word test)
keyword b.m.w alias bmw (if someone write b.m.w instead of bmw)
etc.
So far if a user searches for "bmw 316"
I use LIKE "%bmw%316%"
to get the results.
Now if the user searches for "b.m.w 316"
I must use
"%b.m.w%316%" OR
"%bmw%316%"
because b.m.w
has alias bmw
.
In the case of 6 words with 2-3 aliases there are too many combinations.
I am trying to achieve it with regexp.
In the scenario above it would be something like (bmw|b.m.w) 316
.
How do I solve this problem?