Em 16/09/11, Édson Mundin Ferreira<edson.mun...@gmail.com> escreveu:
> Como faço uma condição comparando com palavras inteiras?
> Alguém tem algum exemplo usando expressão regular?
>


bdteste=# SELECT regexp_matches(x, '[[:<:]]foo[[:>:]]') FROM (VALUES
('foo'), ('foofoo'), ('foofoofoo'), ('ofo'), ('ofoofo'),
('ofoofoofo')) AS f(x);
 regexp_matches
----------------
 {foo}
(1 row)

http://www.postgresql.org/docs/current/interactive/functions-matching.html#FUNCTIONS-POSIX-REGEXP

Osvaldo
_______________________________________________
pgbr-geral mailing list
pgbr-geral@listas.postgresql.org.br
https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral

Reply via email to