let's say I have a string like Michael is studying at the Faculty of Economics at the University
and I need to check if a given string contains the following expression: Facul* of Econom*
where the star sign implies that the word can have many different endings
In general, my goal is to find similar expressions within tables from the clickhouse database. If you suggest other options for solving this problem, I will be grateful
If you want to match any lowercase letters following your two words use this:
\bFacul[a-z]* of Econom[a-z]*\b
If you want to match any optional letters following your two words use this:
\bFacul[A-Za-z]* of Econom[A-Za-z]*\b
Explanation:
\b
- word boundaryFacul
- literal text[A-Za-z]*
- 0 to multiple alpha charsof
- literal textEconom
- literal text[A-Za-z]*
- 0 to multiple alpha chars\b
- word boundaryIf you want to be be more forgiving with upper/lowercase and spaces use this:
\b[Ff]acul[A-Za-z]* +of +[Ee]conom[A-Za-z]*\b
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments