Looking for a simple SQL regular expression (PostgreSQL) or a similar solution (possibly soundex) that allows you to use flexible search. So during the search hyphens, spaces, etc. Omitted. As part of the search, and only raw characters are searched in the table .:
Currently used:
SELECT * FROM Productions WHERE part_no ~* '%search_term%'
If a user creates UTR-1, he cannot call UTR1 or UTR 1 stored in the database.
But no match occurs when part_no has a dash and the user omits that character (or vice versa)
EXAMPLE a search for a part of UTR-1 should find all matches below.
UTR1
UTR --1
UTR 1
any suggestions...
source
share