Search Postgresql Archives

Re: Regular expressions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Tumurbaatar S." <tumurbaatar@datacom.mn> writes:
> 2. 2 or more of same char
> how the 2nd's pattern should be look?

I think you need a back reference:

regression=# select 'abc' ~ '(.)\\1';
 ?column?
----------
 f
(1 row)
 
regression=# select 'abb' ~ '(.)\\1';
 ?column?
----------
 t
(1 row)

			regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux