Re: Regex Query Index question - Mailing list pgsql-general

From David Johnston
Subject Re: Regex Query Index question
Date
Msg-id B1D22FDB-8AB1-4C74-AE54-1D91C91C669C@yahoo.com
Whole thread Raw
In response to Re: Regex Query Index question  (David Johnston <polobo@yahoo.com>)
List pgsql-general
>
> Not testing here but... and ignore whitespace
>
> '^( [ \[\( ]? \s* \d{3} \s* [ -\s\]\) ] \d{3} [ -\s ] \d{4} )$'
>
Some tweaks needed but seriously consider dropping RegEx and going the functional index route.

> '^( [ \[\( ]? \s* \d{3} \s* [ -\s\]\) ] \s* \d{3} \s* [ -\s ] \s* \d{4} )$'

Added some extra white-space checking but again not tested.

You can probably find better/more flexible expressions online.

David J.

pgsql-general by date:

Previous
From: David Johnston
Date:
Subject: Re: Regex Query Index question
Next
From: Ondrej Ivanič
Date:
Subject: Re: Postgres on SSD