| От | Tom Lane |
|---|---|
| Тема | Re: Regular Expressions |
| Дата | |
| Msg-id | 3966.1541361307@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | RE: Regular Expressions ("Mark Williams" <markwillimas@gmail.com>) |
| Ответы |
RE: Regular Expressions
|
| Список | pgsql-sql |
"Mark Williams" <markwillimas@gmail.com> writes:
> Also, what would be the regular expression if you want to check whether all the words were in the field where you had
say10 words/phrases you wanted to check for?
As David said, regular expressions aren't really designed to do that.
Personally I'd do the AND at the SQL level, ie
myfield ~* '\mtext1\M' AND myfield ~* '\mtext2\M' AND ...
You might also take a look at the full text search machinery, which
is probably better suited to this task.
regards, tom lane
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера