Re: Regular Expressions - Mailing list pgsql-sql

From David G. Johnston
Subject Re: Regular Expressions
Date
Msg-id CAKFQuwYtv9Dk3EKzuO4A_rftJnRc9sCD8D5V_O9vKmXz5c5YzQ@mail.gmail.com
Whole thread Raw
In response to RE: Regular Expressions  ("Mark Williams" <markwillimas@gmail.com>)
List pgsql-sql
On Sunday, November 4, 2018, Mark Williams <markwillimas@gmail.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.


pgsql-sql by date:

Previous
From: "Mark Williams"
Date:
Subject: RE: Regular Expressions
Next
From: Tom Lane
Date:
Subject: Re: Regular Expressions