Re: Regular Expressions

"David G. Johnston" <[email protected]> Sun, 4 Nov 2018 12:51:48 -0700
Newsgroups gmane.comp.db.postgresql.sql
Message-ID <CAKFQuwYtv9Dk3EKzuO4A_rftJnRc9sCD8D5V_O9vKmXz5c5YzQ@mail.gmail.com>
On Sunday, November 4, 2018, Mark Williams <[email protected]> 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.
>
>
>