| From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
|---|---|
| To: | Mark Williams <markwillimas(at)gmail(dot)com> |
| Cc: | "A(dot) Sasaki" <asasaki(at)gmail(dot)com>, "pgsql-sql(at)lists(dot)postgresql(dot)org" <pgsql-sql(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Regular Expressions |
| Date: | 2018-11-04 19:51:48 |
| Message-ID: | CAKFQuwYtv9Dk3EKzuO4A_rftJnRc9sCD8D5V_O9vKmXz5c5YzQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
On Sunday, November 4, 2018, Mark Williams <markwillimas(at)gmail(dot)com> wrote:
>
> Also, what would be the regular expression if you want to check whether
> all the words were in the field where you had say 10 words/phrases you
> wanted to check for?
>
> ==============
>
> Consider full text search instead.
>
> Maybe “split_to_array” on spaces and then do something like:
>
> ARRAY[‘term1’, ‘term2’]::text[] && split_to_array(field, ‘ ‘)
>
> David J.
>
>
>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2018-11-04 19:55:07 | Re: Regular Expressions |
| Previous Message | Mark Williams | 2018-11-04 19:43:26 | RE: Regular Expressions |