Thread: Re: What is the regex for apostraphe in postgres

Re: What is the regex for apostraphe in postgres

From
"David G. Johnston"
Date:
On Thursday, October 14, 2021, Shaozhong SHI <shishaozhong@gmail.com> wrote:
Can we check whether a text string contains apostraphe ' of not?


Yes.  But if you write the regex using single quotes to denote the literal you need to follow sql literal writing conventions for escaping the single quote inside the literal.  This is documented.

David J.