Is there a way for me to search using wild-card % in Postgres to only retain the searches that have non-zero replacement of %? So %a% should only result in cab but not a.
If not with %, is there another simple way to do so?
Thanks!
1 Answer
From the manual
An underscore (_) in pattern stands for (matches) any single character; a percent sign (%) matches any sequence of zero or more characters.
You need to use _ instead of %
Edited
Final expression as suggested by @Abelisto should be '%_a_%'
1 Comment
Abelisto
I think "non-zero" (one or more) means
%_a_%
_instead of%.