blob: cde3b60b415609f0e542ee49bf9457482971350a [file] [log] [blame]
drop table if exists phone_book;
NOTICE: table "phone_book" does not exist, skipping
create table phone_book
(
lname char varying(25),
fname char varying(25),
state char(2),
phone_num bigint
)
distributed by (lname);
\copy public.phone_book from 'data/phone_book.txt' delimiter as '|'
drop table if exists phone_book_substr;
NOTICE: table "phone_book_substr" does not exist, skipping
create table phone_book_substr
(
lname_substr char(3),
lname char varying(25),
fname char varying(25),
state char(2),
phone_num bigint
)
distributed by (lname_substr);
--distributed by (substr(lname,1,2));
insert into
phone_book_substr
(
lname_substr,
lname,
fname,
state,
phone_num
)
select
substr(lname,1,3),
lname,
fname,
state,
phone_num
from phone_book
order by lname
;
analyze phone_book_substr;
select count(*)
from phone_book_substr
;
count
-------
17388
(1 row)
--17388
---------------------------------------------------------
select lname_substr
from phone_book_substr
where lname_substr LIKE 'Aa' group by 1 order by 1;
lname_substr
--------------
(0 rows)
--0 Rows.
select lname_substr
from phone_book_substr
where lname_substr LIKE 'A%' group by 1 order by 1;
lname_substr
--------------
Aad
Abe
Abf
Abg
Abh
Abi
Acj
Ack
Acl
Acm
Acn
Aco
Acp
Acq
Acr
Ads
Adt
Adu
Adv
Adw
Adx
Ady
Adz
(23 rows)
select count(*)
from phone_book_substr
where lname_substr LIKE 'A%';
count
-------
621
(1 row)
--621
select lname_substr
from phone_book_substr
where lname_substr LIKE '_a_' group by 1 order by 1;
lname_substr
--------------
Aad
Bad
Cad
Dad
Ead
Fad
Gad
Had
Iad
Jad
Kad
Lad
Mad
Nad
Oad
Pad
Rad
Sad
Uad
Vad
Wad
Xad
Yad
Zad
(24 rows)
select lname_substr
from phone_book_substr
where lname_substr LIKE '_Z_' group by 1 order by 1;
lname_substr
--------------
(0 rows)
--0 Rows.
select lname_substr
from phone_book_substr
where lname_substr LIKE 'Abd' group by 1 order by 1;
lname_substr
--------------
(0 rows)
--0 Rows.
-- ~~ is equivalent to LIKE
select count(*)
from phone_book_substr
where lname_substr ~~ 'A%';
count
-------
621
(1 row)
--621
select count(*)
from phone_book_substr
where lname_substr ~~ '_b_';
count
-------
3240
(1 row)
--3240
-- ILIKE case sensitive LIKE
select count(*)
from phone_book_substr
where lname_substr ILIKE 'a%';
count
-------
621
(1 row)
-- ~~* is equivalent to ILIKE
select count(*)
from phone_book_substr
where lname_substr ~~* 'a%';
count
-------
621
(1 row)
--621
select count(*)
from phone_book_substr
where lname_substr ~~* '_b_';
count
-------
3240
(1 row)
--3240
-- NOT LIKE
select lname_substr
from phone_book_substr
where lname_substr NOT LIKE 'Z%' group by 1 order by 1;
lname_substr
--------------
Aad
Abe
Abf
Abg
Abh
Abi
Acj
Ack
Acl
Acm
Acn
Aco
Acp
Acq
Acr
Ads
Adt
Adu
Adv
Adw
Adx
Ady
Adz
Bad
Bbe
Bbf
Bbg
Bbh
Bbi
Bcj
Bck
Bcl
Bcm
Bcn
Bco
Bcp
Bcq
Bcr
Bds
Bdt
Bdu
Bdv
Bdw
Bdx
Bdy
Bdz
Cad
Cbe
Cbf
Cbg
Cbh
Cbi
Ccj
Cck
Ccl
Ccm
Ccn
Cco
Ccp
Ccq
Ccr
Cds
Cdt
Cdu
Cdv
Cdw
Cdx
Cdy
Cdz
Dad
Dbe
Dbf
Dbg
Dbh
Dbi
Dcj
Dck
Dcl
Dcm
Dcn
Dco
Dcp
Dcq
Dcr
Dds
Ddt
Ddu
Ddv
Ddw
Ddx
Ddy
Ddz
Ead
Ebe
Ebf
Ebg
Ebh
Ebi
Ecj
Eck
Ecl
Ecm
Ecn
Eco
Ecp
Ecq
Ecr
Eds
Edt
Edu
Edv
Edw
Edx
Edy
Edz
Fad
Fbe
Fbf
Fbg
Fbh
Fbi
Fcj
Fck
Fcl
Fcm
Fcn
Fco
Fcp
Fcq
Fcr
Fds
Fdt
Fdu
Fdv
Fdw
Fdx
Fdy
Fdz
Gad
Gbe
Gbf
Gbg
Gbh
Gbi
Gcj
Gck
Gcl
Gcm
Gcn
Gco
Gcp
Gcq
Gcr
Gds
Gdt
Gdu
Gdv
Gdw
Gdx
Gdy
Gdz
Had
Hbe
Hbf
Hbg
Hbh
Hbi
Hcj
Hck
Hcl
Hcm
Hcn
Hco
Hcp
Hcq
Hcr
Hds
Hdt
Hdu
Hdv
Hdw
Hdx
Hdy
Hdz
Iad
Ibe
Ibf
Ibg
Ibh
Ibi
Icj
Ick
Icl
Icm
Icn
Ico
Icp
Icq
Icr
Ids
Idt
Idu
Idv
Idw
Idx
Idy
Idz
Jad
Jbe
Jbf
Jbg
Jbh
Jbi
Jcj
Jck
Jcl
Jcm
Jcn
Jco
Jcp
Jcq
Jcr
Jds
Jdt
Jdu
Jdv
Jdw
Jdx
Jdy
Jdz
Kad
Kbe
Kbf
Kbg
Kbh
Kbi
Kcj
Kck
Kcl
Kcm
Kcn
Kco
Kcp
Kcq
Kcr
Kds
Kdt
Kdu
Kdv
Kdw
Kdx
Kdy
Kdz
Ked
Kee
Kef
Keg
Keh
Kei
Kej
Kek
Kel
Kem
Ken
Keo
Kep
Keq
Ker
Kes
Ket
Keu
Kev
Kew
Kex
Key
Kez
Lad
Lbe
Lbf
Lbg
Lbh
Lbi
Lcj
Lck
Lcl
Lcm
Lcn
Lco
Lcp
Lcq
Lcr
Lds
Ldt
Ldu
Ldv
Ldw
Ldx
Ldy
Ldz
Lid
Lie
Lif
Lig
Lih
Lii
Lij
Lik
Lil
Lim
Lin
Lio
Lip
Liq
Lir
Lis
Lit
Liu
Liv
Liw
Lix
Liy
Liz
Mad
Mbe
Mbf
Mbg
Mbh
Mbi
Mcj
Mck
Mcl
Mcm
Mcn
Mco
Mcp
Mcq
Mcr
Mds
Mdt
Mdu
Mdv
Mdw
Mdx
Mdy
Mdz
Mod
Moe
Mof
Mog
Moh
Moi
Moj
Mok
Mol
Mom
Mon
Moo
Mop
Moq
Mor
Mos
Mot
Mou
Mov
Mow
Mox
Moy
Moz
Nad
Nbe
Nbf
Nbg
Nbh
Nbi
Ncj
Nck
Ncl
Ncm
Ncn
Nco
Ncp
Ncq
Ncr
Nds
Ndt
Ndu
Ndv
Ndw
Ndx
Ndy
Ndz
Nud
Nue
Nuf
Nug
Nuh
Nui
Nuj
Nuk
Nul
Num
Nun
Nuo
Nup
Nuq
Nur
Nus
Nut
Nuu
Nuv
Nuw
Nux
Nuy
Nuz
Oad
Obe
Obf
Obg
Obh
Obi
Ocj
Ock
Ocl
Ocm
Ocn
Oco
Ocp
Ocq
Ocr
Ods
Odt
Odu
Odv
Odw
Odx
Ody
Odz
Pad
Pbe
Pbf
Pbg
Pbh
Pbi
Pcj
Pck
Pcl
Pcm
Pcn
Pco
Pcp
Pcq
Pcr
Pds
Pdt
Pdu
Pdv
Pdw
Pdx
Pdy
Pdz
Rad
Rbe
Rbf
Rbg
Rbh
Rbi
Rcj
Rck
Rcl
Rcm
Rcn
Rco
Rcp
Rcq
Rcr
Rds
Rdt
Rdu
Rdv
Rdw
Rdx
Rdy
Rdz
Sad
Sbe
Sbf
Sbg
Sbh
Sbi
Scj
Sck
Scl
Scm
Scn
Sco
Scp
Scq
Scr
Sds
Sdt
Sdu
Sdv
Sdw
Sdx
Sdy
Sdz
Uad
Ube
Ubf
Ubg
Ubh
Ubi
Ucj
Uck
Ucl
Ucm
Ucn
Uco
Ucp
Ucq
Ucr
Uds
Udt
Udu
Udv
Udw
Udx
Udy
Udz
Vad
Vbe
Vbf
Vbg
Vbh
Vbi
Vcj
Vck
Vcl
Vcm
Vcn
Vco
Vcp
Vcq
Vcr
Vds
Vdt
Vdu
Vdv
Vdw
Vdx
Vdy
Vdz
Wad
Wbe
Wbf
Wbg
Wbh
Wbi
Wcj
Wck
Wcl
Wcm
Wcn
Wco
Wcp
Wcq
Wcr
Wds
Wdt
Wdu
Wdv
Wdw
Wdx
Wdy
Wdz
Xad
Xbe
Xbf
Xbg
Xbh
Xbi
Xcj
Xck
Xcl
Xcm
Xcn
Xco
Xcp
Xcq
Xcr
Xds
Xdt
Xdu
Xdv
Xdw
Xdx
Xdy
Xdz
Yad
Ybe
Ybf
Ybg
Ybh
Ybi
Ycj
Yck
Ycl
Ycm
Ycn
Yco
Ycp
Ycq
Ycr
Yds
Ydt
Ydu
Ydv
Ydw
Ydx
Ydy
Ydz
(621 rows)
-- !~~ is equivalent to NOT LIKE
select count(*)
from phone_book_substr
where lname_substr !~~ 'A%';
count
-------
16767
(1 row)
--16767
select count(*)
from phone_book_substr
where lname_substr !~~ '_A%';
count
-------
17388
(1 row)
--17388
select count(*)
from phone_book_substr
where lname_substr !~~ '_b%';
count
-------
14148
(1 row)
--14148
select count(*)
from phone_book_substr
where lname_substr !~~ '_B%';
count
-------
17388
(1 row)
--17388
select count(*)
from phone_book_substr
where lname_substr !~~ '_b%';
count
-------
14148
(1 row)
--14148
-- !~~* is equivalent to NOT ILIKE
select count(*)
from phone_book_substr
where lname_substr !~~* 'a%';
count
-------
16767
(1 row)
--16767
select count(*)
from phone_book_substr
where lname_substr !~~* '_A%';
count
-------
16740
(1 row)
--16740
select count(*)
from phone_book_substr
where lname_substr !~~* '_b%';
count
-------
14148
(1 row)
--14148
select count(*)
from phone_book_substr
where lname_substr !~~* '_B%';
count
-------
14148
(1 row)
--14148
select count(*)
from phone_book_substr
where lname_substr !~~* '_B_';
count
-------
14148
(1 row)
--14148
select count(*)
from phone_book_substr
where lname_substr !~~* '_b_';
count
-------
14148
(1 row)
--14148
-- ARRAY
--select array(select fname
-- from phone_book_substr
-- where lname_substr LIKE '%y%');
--select count(*)
--from phone_book_substr
--;
--17388
---------------------------------------------------------
-- ILIKE case sensitive LIKE
select count(*)
from phone_book_substr
where lname_substr ILIKE 'a%';
count
-------
621
(1 row)
--621
select count(*)
from phone_book_substr
where lname_substr ILIKE 'A%';
count
-------
621
(1 row)
--621
select count(*)
from phone_book_substr
where lname_substr ILIKE 'Aa';
count
-------
0
(1 row)
--0
select count(*)
from phone_book_substr
where lname_substr ILIKE '_a_';
count
-------
648
(1 row)
--648
select count(*)
from phone_book_substr
where lname_substr ILIKE '_Z_';
count
-------
0
(1 row)
--0
select count(*)
from phone_book_substr
where lname_substr ILIKE 'Abd';
count
-------
0
(1 row)
--0
--select count(*)
--from phone_book_substr
--;
--17388
---------------------------------------------------------
-- NOT SIMILAR TO
-- | is equivalent to LOGICAL "OR"
select count(*)
from phone_book_substr
where lname_substr NOT SIMILAR TO '(A|B)%';
count
-------
16146
(1 row)
--16146
select count(*)
from phone_book_substr
where lname_substr NOT SIMILAR TO 'A%';
count
-------
16767
(1 row)
--16767
select count(*)
from phone_book_substr
where lname_substr NOT SIMILAR TO 'B%';
count
-------
16767
(1 row)
--16767
select count(*)
from phone_book_substr
where lname_substr NOT SIMILAR TO 'A%'
AND lname_substr NOT SIMILAR TO 'B%';
count
-------
16146
(1 row)
--16146
-------------------------------------------
-- * denotes repetition of the previous item zero or more times.
select count(*)
from phone_book_substr
where lname_substr NOT SIMILAR TO '(A|B)*';
count
-------
17388
(1 row)
--17388
select count(*)
from phone_book_substr
where lname_substr NOT SIMILAR TO 'A*';
count
-------
17388
(1 row)
--17388
select count(*)
from phone_book_substr
where lname_substr NOT SIMILAR TO 'B*';
count
-------
17388
(1 row)
--17388
select count(*)
from phone_book_substr
where lname_substr NOT SIMILAR TO 'A*'
AND lname_substr NOT SIMILAR TO 'B*';
count
-------
17388
(1 row)
--17388
-------------------------------------------
-- + denotes repetition of the previous item zero or more times.
select count(*)
from phone_book_substr
where lname_substr NOT SIMILAR TO '(A|B)+';
count
-------
17388
(1 row)
--17388
select count(*)
from phone_book_substr
where lname_substr NOT SIMILAR TO 'A+';
count
-------
17388
(1 row)
--17388
select count(*)
from phone_book_substr
where lname_substr NOT SIMILAR TO 'B+';
count
-------
17388
(1 row)
--17388
select count(*)
from phone_book_substr
where lname_substr NOT SIMILAR TO 'A+'
AND lname_substr NOT SIMILAR TO 'B+';
count
-------
17388
(1 row)
--17388
-------------------------------------------
-- [...] denotes specifies a character class.
select count(*)
from phone_book_substr
where lname_substr NOT SIMILAR TO '([A...]|[B...])';
count
-------
17388
(1 row)
--17388
select count(*)
from phone_book_substr
where lname_substr NOT SIMILAR TO '[A...]';
count
-------
17388
(1 row)
--17388
select count(*)
from phone_book_substr
where lname_substr NOT SIMILAR TO '[B...]';
count
-------
17388
(1 row)
--17388
select count(*)
from phone_book_substr
where lname_substr NOT SIMILAR TO '[A...]'
AND lname_substr NOT SIMILAR TO '[B...]';
count
-------
17388
(1 row)
--17388
--select count(*)
--from phone_book_substr
--;
--17388
---------------------------------------------------------
-- ~~ is equivalent to LIKE
select count(*)
from phone_book_substr
where lname_substr !~~ 'A%';
count
-------
16767
(1 row)
--16767
select count(*)
from phone_book_substr
where lname_substr !~~ '_A%';
count
-------
17388
(1 row)
--17388
select count(*)
from phone_book_substr
where lname_substr !~~ '_b%';
count
-------
14148
(1 row)
--14148
select count(*)
from phone_book_substr
where lname_substr !~~ '_B%';
count
-------
17388
(1 row)
--17388
select count(*)
from phone_book_substr
where lname_substr !~~ 'B%';
count
-------
16767
(1 row)
--16767
select count(*)
from phone_book_substr
where lname_substr !~~ '_b_';
count
-------
14148
(1 row)
--14148
-----------------------------------------------------------------
---substring(string from pattern for escape character)
-- provides extraction of a substring that matches a SQL
-- regular expression. To indicate the part of the pattern
-- that should be returned on success, the pattern must
-- contain two occurrences of the escape character
-- followed by a double quote ("). The
-- text matching the portion of the pattern between these markers
-- is returned.
----------------------------------------------------------
SELECT SUBSTRING('XY1234Z', 'Y*([0-9]{1,3})');
substring
-----------
123
(1 row)
-- substring
-----------
-- 123
--(1 row)
SELECT SUBSTRING('XY1234Z', 'Y*?([0-9]{1,3})');
substring
-----------
1
(1 row)
-- substring
-----------
-- 1
--(1 row)
----------------------------------------------------------
----------------------------------------------------------
--select substring(lname from '%#"Z_y#"%' for '#') IS NOT NULL
--from phone_book_substr
--where substring(lname from '%#"Z_y#"%' for '#') IS NOT NULL
--;
-- returns 27 rows.
-- lname | substring
-----------+-----------
-- Zdygahd | Zdy
select lname, substring(lname from '%#"Z_yg_h#"%' for '#')
from phone_book_substr
where substring(lname from '%#"Z_yg_h#"%' for '#') IS NOT NULL
;
lname | substring
---------+-----------
Zdygahd | Zdygah
Zdygahd | Zdygah
Zdygahd | Zdygah
Zdygahd | Zdygah
Zdygahd | Zdygah
Zdygahd | Zdygah
Zdygahd | Zdygah
Zdygahd | Zdygah
Zdygahd | Zdygah
Zdygahd | Zdygah
Zdygahd | Zdygah
Zdygahd | Zdygah
Zdygahd | Zdygah
Zdygahd | Zdygah
Zdygahd | Zdygah
Zdygahd | Zdygah
Zdygahd | Zdygah
Zdygahd | Zdygah
Zdygahd | Zdygah
Zdygahd | Zdygah
Zdygahd | Zdygah
Zdygahd | Zdygah
Zdygahd | Zdygah
Zdygahd | Zdygah
Zdygahd | Zdygah
Zdygahd | Zdygah
Zdygahd | Zdygah
(27 rows)
-- returns 27 rows.
-- lname | substring
---------+-----------
-- Zdygahd | Zdy
--select lname, substring(lname from '%\\"Z_yg_h\\"%' for '\\')
--from phone_book_substr
--where substring(lname from '%\\"Z_yg_h\\"%' for '\\') IS NOT NULL
--;
-- returns 27 rows.
-- lname | substring
---------+-----------
-- Zdygahd | Zdy
--select DISTINCT lname, substring(lname from '%\\"__yg_h\\"%' for '\\')
--from phone_book_substr
--where substring(lname from '%\\"__yg_h\\"%' for '\\') IS NOT NULL
--;
--dygahd | Adygah
-- Bdygahd | Bdygah
-- Cdygahd | Cdygah
-- Ddygahd | Ddygah
-- Edygahd | Edygah
-- Fdygahd | Fdygah
-- Gdygahd | Gdygah
-- Hdygahd | Hdygah
-- Idygahd | Idygah
-- Jdygahd | Jdygah
-- Kdygahd | Kdygah
-- Keygahd | Keygah
-- Ldygahd | Ldygah
-- Liygahd | Liygah
-- Mdygahd | Mdygah
-- Moygahd | Moygah
-- Ndygahd | Ndygah
-- Nuygahd | Nuygah
-- Odygahd | Odygah
-- Pdygahd | Pdygah
-- Rdygahd | Rdygah
-- Sdygahd | Sdygah
-- Udygahd | Udygah
-- Gdygahd | Gdygah
-- Hdygahd | Hdygah
-- Idygahd | Idygah
-- Jdygahd | Jdygah
-- Kdygahd | Kdygah
-- Keygahd | Keygah
-- Ldygahd | Ldygah
-- Liygahd | Liygah
-- Mdygahd | Mdygah
-- Moygahd | Moygah
-- Ndygahd | Ndygah
-- Nuygahd | Nuygah
-- Odygahd | Odygah
-- Pdygahd | Pdygah
-- Rdygahd | Rdygah
-- Sdygahd | Sdygah
-- Udygahd | Udygah
-- Vdygahd | Vdygah
-- Wdygahd | Wdygah
-- Xdygahd | Xdygah
-- Ydygahd | Ydygah
-- Zdygahd | Zdygah
------------------------------------------------------------------------
-- The function regexp_replace: Regular Expression Replace.
-- The syntax for regexp_replace is
-- regexp_replace(source, pattern, replacement[,flags])
-- The syntax is reg
------------------------------------------------------------------------
select regexp_replace('foobarbaz', 'b..', 'X');
regexp_replace
----------------
fooXbaz
(1 row)
-- regexp_replace
----------------
-- fooXbaz
--(1 row)
select regexp_replace('foobarbaz', 'b..', 'X', 'g');
regexp_replace
----------------
fooXX
(1 row)
-- regexp_replace
----------------
-- fooXX
--(1 row)
--select regexp_replace('foobarbaz', 'b(..)', E'X\\1Y', 'g');
-- regexp_replace
----------------
-- fooXarYXazY
--(1 row)
select regexp_replace('Zdygahd', 'yg','GY')
;
regexp_replace
----------------
ZdGYahd
(1 row)
-- regexp_replace
----------------
-- ZdGYahd
--(1 row)
select DISTINCT lname, regexp_replace(lname, '...g..','G')
from phone_book_substr order by lname
;
lname | regexp_replace
---------+----------------
Aadgahd | Gd
Abegahd | Gd
Abfgahd | Gd
Abggahd | Gd
Abhgahd | Gd
Abigahd | Gd
Acjgahd | Gd
Ackgahd | Gd
Aclgahd | Gd
Acmgahd | Gd
Acngahd | Gd
Acogahd | Gd
Acpgahd | Gd
Acqgahd | Gd
Acrgahd | Gd
Adsgahd | Gd
Adtgahd | Gd
Adugahd | Gd
Advgahd | Gd
Adwgahd | Gd
Adxgahd | Gd
Adygahd | Gd
Adzgahd | Gd
Badgahd | Gd
Bbegahd | Gd
Bbfgahd | Gd
Bbggahd | Gd
Bbhgahd | Gd
Bbigahd | Gd
Bcjgahd | Gd
Bckgahd | Gd
Bclgahd | Gd
Bcmgahd | Gd
Bcngahd | Gd
Bcogahd | Gd
Bcpgahd | Gd
Bcqgahd | Gd
Bcrgahd | Gd
Bdsgahd | Gd
Bdtgahd | Gd
Bdugahd | Gd
Bdvgahd | Gd
Bdwgahd | Gd
Bdxgahd | Gd
Bdygahd | Gd
Bdzgahd | Gd
Cadgahd | Gd
Cbegahd | Gd
Cbfgahd | Gd
Cbggahd | Gd
Cbhgahd | Gd
Cbigahd | Gd
Ccjgahd | Gd
Cckgahd | Gd
Cclgahd | Gd
Ccmgahd | Gd
Ccngahd | Gd
Ccogahd | Gd
Ccpgahd | Gd
Ccqgahd | Gd
Ccrgahd | Gd
Cdsgahd | Gd
Cdtgahd | Gd
Cdugahd | Gd
Cdvgahd | Gd
Cdwgahd | Gd
Cdxgahd | Gd
Cdygahd | Gd
Cdzgahd | Gd
Dadgahd | Gd
Dbegahd | Gd
Dbfgahd | Gd
Dbggahd | Gd
Dbhgahd | Gd
Dbigahd | Gd
Dcjgahd | Gd
Dckgahd | Gd
Dclgahd | Gd
Dcmgahd | Gd
Dcngahd | Gd
Dcogahd | Gd
Dcpgahd | Gd
Dcqgahd | Gd
Dcrgahd | Gd
Ddsgahd | Gd
Ddtgahd | Gd
Ddugahd | Gd
Ddvgahd | Gd
Ddwgahd | Gd
Ddxgahd | Gd
Ddygahd | Gd
Ddzgahd | Gd
Eadgahd | Gd
Ebegahd | Gd
Ebfgahd | Gd
Ebggahd | Gd
Ebhgahd | Gd
Ebigahd | Gd
Ecjgahd | Gd
Eckgahd | Gd
Eclgahd | Gd
Ecmgahd | Gd
Ecngahd | Gd
Ecogahd | Gd
Ecpgahd | Gd
Ecqgahd | Gd
Ecrgahd | Gd
Edsgahd | Gd
Edtgahd | Gd
Edugahd | Gd
Edvgahd | Gd
Edwgahd | Gd
Edxgahd | Gd
Edygahd | Gd
Edzgahd | Gd
Fadgahd | Gd
Fbegahd | Gd
Fbfgahd | Gd
Fbggahd | Gd
Fbhgahd | Gd
Fbigahd | Gd
Fcjgahd | Gd
Fckgahd | Gd
Fclgahd | Gd
Fcmgahd | Gd
Fcngahd | Gd
Fcogahd | Gd
Fcpgahd | Gd
Fcqgahd | Gd
Fcrgahd | Gd
Fdsgahd | Gd
Fdtgahd | Gd
Fdugahd | Gd
Fdvgahd | Gd
Fdwgahd | Gd
Fdxgahd | Gd
Fdygahd | Gd
Fdzgahd | Gd
Gadgahd | Gd
Gbegahd | Gd
Gbfgahd | Gd
Gbggahd | Gd
Gbhgahd | Gd
Gbigahd | Gd
Gcjgahd | Gd
Gckgahd | Gd
Gclgahd | Gd
Gcmgahd | Gd
Gcngahd | Gd
Gcogahd | Gd
Gcpgahd | Gd
Gcqgahd | Gd
Gcrgahd | Gd
Gdsgahd | Gd
Gdtgahd | Gd
Gdugahd | Gd
Gdvgahd | Gd
Gdwgahd | Gd
Gdxgahd | Gd
Gdygahd | Gd
Gdzgahd | Gd
Hadgahd | Gd
Hbegahd | Gd
Hbfgahd | Gd
Hbggahd | Gd
Hbhgahd | Gd
Hbigahd | Gd
Hcjgahd | Gd
Hckgahd | Gd
Hclgahd | Gd
Hcmgahd | Gd
Hcngahd | Gd
Hcogahd | Gd
Hcpgahd | Gd
Hcqgahd | Gd
Hcrgahd | Gd
Hdsgahd | Gd
Hdtgahd | Gd
Hdugahd | Gd
Hdvgahd | Gd
Hdwgahd | Gd
Hdxgahd | Gd
Hdygahd | Gd
Hdzgahd | Gd
Iadgahd | Gd
Ibegahd | Gd
Ibfgahd | Gd
Ibggahd | Gd
Ibhgahd | Gd
Ibigahd | Gd
Icjgahd | Gd
Ickgahd | Gd
Iclgahd | Gd
Icmgahd | Gd
Icngahd | Gd
Icogahd | Gd
Icpgahd | Gd
Icqgahd | Gd
Icrgahd | Gd
Idsgahd | Gd
Idtgahd | Gd
Idugahd | Gd
Idvgahd | Gd
Idwgahd | Gd
Idxgahd | Gd
Idygahd | Gd
Idzgahd | Gd
Jadgahd | Gd
Jbegahd | Gd
Jbfgahd | Gd
Jbggahd | Gd
Jbhgahd | Gd
Jbigahd | Gd
Jcjgahd | Gd
Jckgahd | Gd
Jclgahd | Gd
Jcmgahd | Gd
Jcngahd | Gd
Jcogahd | Gd
Jcpgahd | Gd
Jcqgahd | Gd
Jcrgahd | Gd
Jdsgahd | Gd
Jdtgahd | Gd
Jdugahd | Gd
Jdvgahd | Gd
Jdwgahd | Gd
Jdxgahd | Gd
Jdygahd | Gd
Jdzgahd | Gd
Kadgahd | Gd
Kbegahd | Gd
Kbfgahd | Gd
Kbggahd | Gd
Kbhgahd | Gd
Kbigahd | Gd
Kcjgahd | Gd
Kckgahd | Gd
Kclgahd | Gd
Kcmgahd | Gd
Kcngahd | Gd
Kcogahd | Gd
Kcpgahd | Gd
Kcqgahd | Gd
Kcrgahd | Gd
Kdsgahd | Gd
Kdtgahd | Gd
Kdugahd | Gd
Kdvgahd | Gd
Kdwgahd | Gd
Kdxgahd | Gd
Kdygahd | Gd
Kdzgahd | Gd
Kedgahd | Gd
Keegahd | Gd
Kefgahd | Gd
Keggahd | Gd
Kehgahd | Gd
Keigahd | Gd
Kejgahd | Gd
Kekgahd | Gd
Kelgahd | Gd
Kemgahd | Gd
Kengahd | Gd
Keogahd | Gd
Kepgahd | Gd
Keqgahd | Gd
Kergahd | Gd
Kesgahd | Gd
Ketgahd | Gd
Keugahd | Gd
Kevgahd | Gd
Kewgahd | Gd
Kexgahd | Gd
Keygahd | Gd
Kezgahd | Gd
Ladgahd | Gd
Lbegahd | Gd
Lbfgahd | Gd
Lbggahd | Gd
Lbhgahd | Gd
Lbigahd | Gd
Lcjgahd | Gd
Lckgahd | Gd
Lclgahd | Gd
Lcmgahd | Gd
Lcngahd | Gd
Lcogahd | Gd
Lcpgahd | Gd
Lcqgahd | Gd
Lcrgahd | Gd
Ldsgahd | Gd
Ldtgahd | Gd
Ldugahd | Gd
Ldvgahd | Gd
Ldwgahd | Gd
Ldxgahd | Gd
Ldygahd | Gd
Ldzgahd | Gd
Lidgahd | Gd
Liegahd | Gd
Lifgahd | Gd
Liggahd | Gd
Lihgahd | Gd
Liigahd | Gd
Lijgahd | Gd
Likgahd | Gd
Lilgahd | Gd
Limgahd | Gd
Lingahd | Gd
Liogahd | Gd
Lipgahd | Gd
Liqgahd | Gd
Lirgahd | Gd
Lisgahd | Gd
Litgahd | Gd
Liugahd | Gd
Livgahd | Gd
Liwgahd | Gd
Lixgahd | Gd
Liygahd | Gd
Lizgahd | Gd
Madgahd | Gd
Mbegahd | Gd
Mbfgahd | Gd
Mbggahd | Gd
Mbhgahd | Gd
Mbigahd | Gd
Mcjgahd | Gd
Mckgahd | Gd
Mclgahd | Gd
Mcmgahd | Gd
Mcngahd | Gd
Mcogahd | Gd
Mcpgahd | Gd
Mcqgahd | Gd
Mcrgahd | Gd
Mdsgahd | Gd
Mdtgahd | Gd
Mdugahd | Gd
Mdvgahd | Gd
Mdwgahd | Gd
Mdxgahd | Gd
Mdygahd | Gd
Mdzgahd | Gd
Modgahd | Gd
Moegahd | Gd
Mofgahd | Gd
Moggahd | Gd
Mohgahd | Gd
Moigahd | Gd
Mojgahd | Gd
Mokgahd | Gd
Molgahd | Gd
Momgahd | Gd
Mongahd | Gd
Moogahd | Gd
Mopgahd | Gd
Moqgahd | Gd
Morgahd | Gd
Mosgahd | Gd
Motgahd | Gd
Mougahd | Gd
Movgahd | Gd
Mowgahd | Gd
Moxgahd | Gd
Moygahd | Gd
Mozgahd | Gd
Nadgahd | Gd
Nbegahd | Gd
Nbfgahd | Gd
Nbggahd | Gd
Nbhgahd | Gd
Nbigahd | Gd
Ncjgahd | Gd
Nckgahd | Gd
Nclgahd | Gd
Ncmgahd | Gd
Ncngahd | Gd
Ncogahd | Gd
Ncpgahd | Gd
Ncqgahd | Gd
Ncrgahd | Gd
Ndsgahd | Gd
Ndtgahd | Gd
Ndugahd | Gd
Ndvgahd | Gd
Ndwgahd | Gd
Ndxgahd | Gd
Ndygahd | Gd
Ndzgahd | Gd
Nudgahd | Gd
Nuegahd | Gd
Nufgahd | Gd
Nuggahd | Gd
Nuhgahd | Gd
Nuigahd | Gd
Nujgahd | Gd
Nukgahd | Gd
Nulgahd | Gd
Numgahd | Gd
Nungahd | Gd
Nuogahd | Gd
Nupgahd | Gd
Nuqgahd | Gd
Nurgahd | Gd
Nusgahd | Gd
Nutgahd | Gd
Nuugahd | Gd
Nuvgahd | Gd
Nuwgahd | Gd
Nuxgahd | Gd
Nuygahd | Gd
Nuzgahd | Gd
Oadgahd | Gd
Obegahd | Gd
Obfgahd | Gd
Obggahd | Gd
Obhgahd | Gd
Obigahd | Gd
Ocjgahd | Gd
Ockgahd | Gd
Oclgahd | Gd
Ocmgahd | Gd
Ocngahd | Gd
Ocogahd | Gd
Ocpgahd | Gd
Ocqgahd | Gd
Ocrgahd | Gd
Odsgahd | Gd
Odtgahd | Gd
Odugahd | Gd
Odvgahd | Gd
Odwgahd | Gd
Odxgahd | Gd
Odygahd | Gd
Odzgahd | Gd
Padgahd | Gd
Pbegahd | Gd
Pbfgahd | Gd
Pbggahd | Gd
Pbhgahd | Gd
Pbigahd | Gd
Pcjgahd | Gd
Pckgahd | Gd
Pclgahd | Gd
Pcmgahd | Gd
Pcngahd | Gd
Pcogahd | Gd
Pcpgahd | Gd
Pcqgahd | Gd
Pcrgahd | Gd
Pdsgahd | Gd
Pdtgahd | Gd
Pdugahd | Gd
Pdvgahd | Gd
Pdwgahd | Gd
Pdxgahd | Gd
Pdygahd | Gd
Pdzgahd | Gd
Radgahd | Gd
Rbegahd | Gd
Rbfgahd | Gd
Rbggahd | Gd
Rbhgahd | Gd
Rbigahd | Gd
Rcjgahd | Gd
Rckgahd | Gd
Rclgahd | Gd
Rcmgahd | Gd
Rcngahd | Gd
Rcogahd | Gd
Rcpgahd | Gd
Rcqgahd | Gd
Rcrgahd | Gd
Rdsgahd | Gd
Rdtgahd | Gd
Rdugahd | Gd
Rdvgahd | Gd
Rdwgahd | Gd
Rdxgahd | Gd
Rdygahd | Gd
Rdzgahd | Gd
Sadgahd | Gd
Sbegahd | Gd
Sbfgahd | Gd
Sbggahd | Gd
Sbhgahd | Gd
Sbigahd | Gd
Scjgahd | Gd
Sckgahd | Gd
Sclgahd | Gd
Scmgahd | Gd
Scngahd | Gd
Scogahd | Gd
Scpgahd | Gd
Scqgahd | Gd
Scrgahd | Gd
Sdsgahd | Gd
Sdtgahd | Gd
Sdugahd | Gd
Sdvgahd | Gd
Sdwgahd | Gd
Sdxgahd | Gd
Sdygahd | Gd
Sdzgahd | Gd
Uadgahd | Gd
Ubegahd | Gd
Ubfgahd | Gd
Ubggahd | Gd
Ubhgahd | Gd
Ubigahd | Gd
Ucjgahd | Gd
Uckgahd | Gd
Uclgahd | Gd
Ucmgahd | Gd
Ucngahd | Gd
Ucogahd | Gd
Ucpgahd | Gd
Ucqgahd | Gd
Ucrgahd | Gd
Udsgahd | Gd
Udtgahd | Gd
Udugahd | Gd
Udvgahd | Gd
Udwgahd | Gd
Udxgahd | Gd
Udygahd | Gd
Udzgahd | Gd
Vadgahd | Gd
Vbegahd | Gd
Vbfgahd | Gd
Vbggahd | Gd
Vbhgahd | Gd
Vbigahd | Gd
Vcjgahd | Gd
Vckgahd | Gd
Vclgahd | Gd
Vcmgahd | Gd
Vcngahd | Gd
Vcogahd | Gd
Vcpgahd | Gd
Vcqgahd | Gd
Vcrgahd | Gd
Vdsgahd | Gd
Vdtgahd | Gd
Vdugahd | Gd
Vdvgahd | Gd
Vdwgahd | Gd
Vdxgahd | Gd
Vdygahd | Gd
Vdzgahd | Gd
Wadgahd | Gd
Wbegahd | Gd
Wbfgahd | Gd
Wbggahd | Gd
Wbhgahd | Gd
Wbigahd | Gd
Wcjgahd | Gd
Wckgahd | Gd
Wclgahd | Gd
Wcmgahd | Gd
Wcngahd | Gd
Wcogahd | Gd
Wcpgahd | Gd
Wcqgahd | Gd
Wcrgahd | Gd
Wdsgahd | Gd
Wdtgahd | Gd
Wdugahd | Gd
Wdvgahd | Gd
Wdwgahd | Gd
Wdxgahd | Gd
Wdygahd | Gd
Wdzgahd | Gd
Xadgahd | Gd
Xbegahd | Gd
Xbfgahd | Gd
Xbggahd | Gd
Xbhgahd | Gd
Xbigahd | Gd
Xcjgahd | Gd
Xckgahd | Gd
Xclgahd | Gd
Xcmgahd | Gd
Xcngahd | Gd
Xcogahd | Gd
Xcpgahd | Gd
Xcqgahd | Gd
Xcrgahd | Gd
Xdsgahd | Gd
Xdtgahd | Gd
Xdugahd | Gd
Xdvgahd | Gd
Xdwgahd | Gd
Xdxgahd | Gd
Xdygahd | Gd
Xdzgahd | Gd
Yadgahd | Gd
Ybegahd | Gd
Ybfgahd | Gd
Ybggahd | Gd
Ybhgahd | Gd
Ybigahd | Gd
Ycjgahd | Gd
Yckgahd | Gd
Yclgahd | Gd
Ycmgahd | Gd
Ycngahd | Gd
Ycogahd | Gd
Ycpgahd | Gd
Ycqgahd | Gd
Ycrgahd | Gd
Ydsgahd | Gd
Ydtgahd | Gd
Ydugahd | Gd
Ydvgahd | Gd
Ydwgahd | Gd
Ydxgahd | Gd
Ydygahd | Gd
Ydzgahd | Gd
Zadgahd | Gd
Zbegahd | Gd
Zbfgahd | Gd
Zbggahd | Gd
Zbhgahd | Gd
Zbigahd | Gd
Zcjgahd | Gd
Zckgahd | Gd
Zclgahd | Gd
Zcmgahd | Gd
Zcngahd | Gd
Zcogahd | Gd
Zcpgahd | Gd
Zcqgahd | Gd
Zcrgahd | Gd
Zdsgahd | Gd
Zdtgahd | Gd
Zdugahd | Gd
Zdvgahd | Gd
Zdwgahd | Gd
Zdxgahd | Gd
Zdygahd | Gd
Zdzgahd | Gd
(644 rows)
-- lname | regexp_replace
---------+----------------
-- Aadgahd | Gd
-- Abegahd | Gd
-- Abfgahd | Gd
-- Abggahd | Gd
-- Abhgahd | Gd
-- Abigahd | Gd
--.............
--..............
-- Zdugahd | Gd
-- Zdvgahd | Gd
-- Zdwgahd | Gd
-- Zdxgahd | Gd
-- Zdygahd | Gd
-- Zdzgahd | Gd
--(644 rows)
select DISTINCT lname, regexp_replace(lname, '...g...','G')
from phone_book_substr order by lname
;
lname | regexp_replace
---------+----------------
Aadgahd | G
Abegahd | G
Abfgahd | G
Abggahd | G
Abhgahd | G
Abigahd | G
Acjgahd | G
Ackgahd | G
Aclgahd | G
Acmgahd | G
Acngahd | G
Acogahd | G
Acpgahd | G
Acqgahd | G
Acrgahd | G
Adsgahd | G
Adtgahd | G
Adugahd | G
Advgahd | G
Adwgahd | G
Adxgahd | G
Adygahd | G
Adzgahd | G
Badgahd | G
Bbegahd | G
Bbfgahd | G
Bbggahd | G
Bbhgahd | G
Bbigahd | G
Bcjgahd | G
Bckgahd | G
Bclgahd | G
Bcmgahd | G
Bcngahd | G
Bcogahd | G
Bcpgahd | G
Bcqgahd | G
Bcrgahd | G
Bdsgahd | G
Bdtgahd | G
Bdugahd | G
Bdvgahd | G
Bdwgahd | G
Bdxgahd | G
Bdygahd | G
Bdzgahd | G
Cadgahd | G
Cbegahd | G
Cbfgahd | G
Cbggahd | G
Cbhgahd | G
Cbigahd | G
Ccjgahd | G
Cckgahd | G
Cclgahd | G
Ccmgahd | G
Ccngahd | G
Ccogahd | G
Ccpgahd | G
Ccqgahd | G
Ccrgahd | G
Cdsgahd | G
Cdtgahd | G
Cdugahd | G
Cdvgahd | G
Cdwgahd | G
Cdxgahd | G
Cdygahd | G
Cdzgahd | G
Dadgahd | G
Dbegahd | G
Dbfgahd | G
Dbggahd | G
Dbhgahd | G
Dbigahd | G
Dcjgahd | G
Dckgahd | G
Dclgahd | G
Dcmgahd | G
Dcngahd | G
Dcogahd | G
Dcpgahd | G
Dcqgahd | G
Dcrgahd | G
Ddsgahd | G
Ddtgahd | G
Ddugahd | G
Ddvgahd | G
Ddwgahd | G
Ddxgahd | G
Ddygahd | G
Ddzgahd | G
Eadgahd | G
Ebegahd | G
Ebfgahd | G
Ebggahd | G
Ebhgahd | G
Ebigahd | G
Ecjgahd | G
Eckgahd | G
Eclgahd | G
Ecmgahd | G
Ecngahd | G
Ecogahd | G
Ecpgahd | G
Ecqgahd | G
Ecrgahd | G
Edsgahd | G
Edtgahd | G
Edugahd | G
Edvgahd | G
Edwgahd | G
Edxgahd | G
Edygahd | G
Edzgahd | G
Fadgahd | G
Fbegahd | G
Fbfgahd | G
Fbggahd | G
Fbhgahd | G
Fbigahd | G
Fcjgahd | G
Fckgahd | G
Fclgahd | G
Fcmgahd | G
Fcngahd | G
Fcogahd | G
Fcpgahd | G
Fcqgahd | G
Fcrgahd | G
Fdsgahd | G
Fdtgahd | G
Fdugahd | G
Fdvgahd | G
Fdwgahd | G
Fdxgahd | G
Fdygahd | G
Fdzgahd | G
Gadgahd | G
Gbegahd | G
Gbfgahd | G
Gbggahd | G
Gbhgahd | G
Gbigahd | G
Gcjgahd | G
Gckgahd | G
Gclgahd | G
Gcmgahd | G
Gcngahd | G
Gcogahd | G
Gcpgahd | G
Gcqgahd | G
Gcrgahd | G
Gdsgahd | G
Gdtgahd | G
Gdugahd | G
Gdvgahd | G
Gdwgahd | G
Gdxgahd | G
Gdygahd | G
Gdzgahd | G
Hadgahd | G
Hbegahd | G
Hbfgahd | G
Hbggahd | G
Hbhgahd | G
Hbigahd | G
Hcjgahd | G
Hckgahd | G
Hclgahd | G
Hcmgahd | G
Hcngahd | G
Hcogahd | G
Hcpgahd | G
Hcqgahd | G
Hcrgahd | G
Hdsgahd | G
Hdtgahd | G
Hdugahd | G
Hdvgahd | G
Hdwgahd | G
Hdxgahd | G
Hdygahd | G
Hdzgahd | G
Iadgahd | G
Ibegahd | G
Ibfgahd | G
Ibggahd | G
Ibhgahd | G
Ibigahd | G
Icjgahd | G
Ickgahd | G
Iclgahd | G
Icmgahd | G
Icngahd | G
Icogahd | G
Icpgahd | G
Icqgahd | G
Icrgahd | G
Idsgahd | G
Idtgahd | G
Idugahd | G
Idvgahd | G
Idwgahd | G
Idxgahd | G
Idygahd | G
Idzgahd | G
Jadgahd | G
Jbegahd | G
Jbfgahd | G
Jbggahd | G
Jbhgahd | G
Jbigahd | G
Jcjgahd | G
Jckgahd | G
Jclgahd | G
Jcmgahd | G
Jcngahd | G
Jcogahd | G
Jcpgahd | G
Jcqgahd | G
Jcrgahd | G
Jdsgahd | G
Jdtgahd | G
Jdugahd | G
Jdvgahd | G
Jdwgahd | G
Jdxgahd | G
Jdygahd | G
Jdzgahd | G
Kadgahd | G
Kbegahd | G
Kbfgahd | G
Kbggahd | G
Kbhgahd | G
Kbigahd | G
Kcjgahd | G
Kckgahd | G
Kclgahd | G
Kcmgahd | G
Kcngahd | G
Kcogahd | G
Kcpgahd | G
Kcqgahd | G
Kcrgahd | G
Kdsgahd | G
Kdtgahd | G
Kdugahd | G
Kdvgahd | G
Kdwgahd | G
Kdxgahd | G
Kdygahd | G
Kdzgahd | G
Kedgahd | G
Keegahd | G
Kefgahd | G
Keggahd | G
Kehgahd | G
Keigahd | G
Kejgahd | G
Kekgahd | G
Kelgahd | G
Kemgahd | G
Kengahd | G
Keogahd | G
Kepgahd | G
Keqgahd | G
Kergahd | G
Kesgahd | G
Ketgahd | G
Keugahd | G
Kevgahd | G
Kewgahd | G
Kexgahd | G
Keygahd | G
Kezgahd | G
Ladgahd | G
Lbegahd | G
Lbfgahd | G
Lbggahd | G
Lbhgahd | G
Lbigahd | G
Lcjgahd | G
Lckgahd | G
Lclgahd | G
Lcmgahd | G
Lcngahd | G
Lcogahd | G
Lcpgahd | G
Lcqgahd | G
Lcrgahd | G
Ldsgahd | G
Ldtgahd | G
Ldugahd | G
Ldvgahd | G
Ldwgahd | G
Ldxgahd | G
Ldygahd | G
Ldzgahd | G
Lidgahd | G
Liegahd | G
Lifgahd | G
Liggahd | G
Lihgahd | G
Liigahd | G
Lijgahd | G
Likgahd | G
Lilgahd | G
Limgahd | G
Lingahd | G
Liogahd | G
Lipgahd | G
Liqgahd | G
Lirgahd | G
Lisgahd | G
Litgahd | G
Liugahd | G
Livgahd | G
Liwgahd | G
Lixgahd | G
Liygahd | G
Lizgahd | G
Madgahd | G
Mbegahd | G
Mbfgahd | G
Mbggahd | G
Mbhgahd | G
Mbigahd | G
Mcjgahd | G
Mckgahd | G
Mclgahd | G
Mcmgahd | G
Mcngahd | G
Mcogahd | G
Mcpgahd | G
Mcqgahd | G
Mcrgahd | G
Mdsgahd | G
Mdtgahd | G
Mdugahd | G
Mdvgahd | G
Mdwgahd | G
Mdxgahd | G
Mdygahd | G
Mdzgahd | G
Modgahd | G
Moegahd | G
Mofgahd | G
Moggahd | G
Mohgahd | G
Moigahd | G
Mojgahd | G
Mokgahd | G
Molgahd | G
Momgahd | G
Mongahd | G
Moogahd | G
Mopgahd | G
Moqgahd | G
Morgahd | G
Mosgahd | G
Motgahd | G
Mougahd | G
Movgahd | G
Mowgahd | G
Moxgahd | G
Moygahd | G
Mozgahd | G
Nadgahd | G
Nbegahd | G
Nbfgahd | G
Nbggahd | G
Nbhgahd | G
Nbigahd | G
Ncjgahd | G
Nckgahd | G
Nclgahd | G
Ncmgahd | G
Ncngahd | G
Ncogahd | G
Ncpgahd | G
Ncqgahd | G
Ncrgahd | G
Ndsgahd | G
Ndtgahd | G
Ndugahd | G
Ndvgahd | G
Ndwgahd | G
Ndxgahd | G
Ndygahd | G
Ndzgahd | G
Nudgahd | G
Nuegahd | G
Nufgahd | G
Nuggahd | G
Nuhgahd | G
Nuigahd | G
Nujgahd | G
Nukgahd | G
Nulgahd | G
Numgahd | G
Nungahd | G
Nuogahd | G
Nupgahd | G
Nuqgahd | G
Nurgahd | G
Nusgahd | G
Nutgahd | G
Nuugahd | G
Nuvgahd | G
Nuwgahd | G
Nuxgahd | G
Nuygahd | G
Nuzgahd | G
Oadgahd | G
Obegahd | G
Obfgahd | G
Obggahd | G
Obhgahd | G
Obigahd | G
Ocjgahd | G
Ockgahd | G
Oclgahd | G
Ocmgahd | G
Ocngahd | G
Ocogahd | G
Ocpgahd | G
Ocqgahd | G
Ocrgahd | G
Odsgahd | G
Odtgahd | G
Odugahd | G
Odvgahd | G
Odwgahd | G
Odxgahd | G
Odygahd | G
Odzgahd | G
Padgahd | G
Pbegahd | G
Pbfgahd | G
Pbggahd | G
Pbhgahd | G
Pbigahd | G
Pcjgahd | G
Pckgahd | G
Pclgahd | G
Pcmgahd | G
Pcngahd | G
Pcogahd | G
Pcpgahd | G
Pcqgahd | G
Pcrgahd | G
Pdsgahd | G
Pdtgahd | G
Pdugahd | G
Pdvgahd | G
Pdwgahd | G
Pdxgahd | G
Pdygahd | G
Pdzgahd | G
Radgahd | G
Rbegahd | G
Rbfgahd | G
Rbggahd | G
Rbhgahd | G
Rbigahd | G
Rcjgahd | G
Rckgahd | G
Rclgahd | G
Rcmgahd | G
Rcngahd | G
Rcogahd | G
Rcpgahd | G
Rcqgahd | G
Rcrgahd | G
Rdsgahd | G
Rdtgahd | G
Rdugahd | G
Rdvgahd | G
Rdwgahd | G
Rdxgahd | G
Rdygahd | G
Rdzgahd | G
Sadgahd | G
Sbegahd | G
Sbfgahd | G
Sbggahd | G
Sbhgahd | G
Sbigahd | G
Scjgahd | G
Sckgahd | G
Sclgahd | G
Scmgahd | G
Scngahd | G
Scogahd | G
Scpgahd | G
Scqgahd | G
Scrgahd | G
Sdsgahd | G
Sdtgahd | G
Sdugahd | G
Sdvgahd | G
Sdwgahd | G
Sdxgahd | G
Sdygahd | G
Sdzgahd | G
Uadgahd | G
Ubegahd | G
Ubfgahd | G
Ubggahd | G
Ubhgahd | G
Ubigahd | G
Ucjgahd | G
Uckgahd | G
Uclgahd | G
Ucmgahd | G
Ucngahd | G
Ucogahd | G
Ucpgahd | G
Ucqgahd | G
Ucrgahd | G
Udsgahd | G
Udtgahd | G
Udugahd | G
Udvgahd | G
Udwgahd | G
Udxgahd | G
Udygahd | G
Udzgahd | G
Vadgahd | G
Vbegahd | G
Vbfgahd | G
Vbggahd | G
Vbhgahd | G
Vbigahd | G
Vcjgahd | G
Vckgahd | G
Vclgahd | G
Vcmgahd | G
Vcngahd | G
Vcogahd | G
Vcpgahd | G
Vcqgahd | G
Vcrgahd | G
Vdsgahd | G
Vdtgahd | G
Vdugahd | G
Vdvgahd | G
Vdwgahd | G
Vdxgahd | G
Vdygahd | G
Vdzgahd | G
Wadgahd | G
Wbegahd | G
Wbfgahd | G
Wbggahd | G
Wbhgahd | G
Wbigahd | G
Wcjgahd | G
Wckgahd | G
Wclgahd | G
Wcmgahd | G
Wcngahd | G
Wcogahd | G
Wcpgahd | G
Wcqgahd | G
Wcrgahd | G
Wdsgahd | G
Wdtgahd | G
Wdugahd | G
Wdvgahd | G
Wdwgahd | G
Wdxgahd | G
Wdygahd | G
Wdzgahd | G
Xadgahd | G
Xbegahd | G
Xbfgahd | G
Xbggahd | G
Xbhgahd | G
Xbigahd | G
Xcjgahd | G
Xckgahd | G
Xclgahd | G
Xcmgahd | G
Xcngahd | G
Xcogahd | G
Xcpgahd | G
Xcqgahd | G
Xcrgahd | G
Xdsgahd | G
Xdtgahd | G
Xdugahd | G
Xdvgahd | G
Xdwgahd | G
Xdxgahd | G
Xdygahd | G
Xdzgahd | G
Yadgahd | G
Ybegahd | G
Ybfgahd | G
Ybggahd | G
Ybhgahd | G
Ybigahd | G
Ycjgahd | G
Yckgahd | G
Yclgahd | G
Ycmgahd | G
Ycngahd | G
Ycogahd | G
Ycpgahd | G
Ycqgahd | G
Ycrgahd | G
Ydsgahd | G
Ydtgahd | G
Ydugahd | G
Ydvgahd | G
Ydwgahd | G
Ydxgahd | G
Ydygahd | G
Ydzgahd | G
Zadgahd | G
Zbegahd | G
Zbfgahd | G
Zbggahd | G
Zbhgahd | G
Zbigahd | G
Zcjgahd | G
Zckgahd | G
Zclgahd | G
Zcmgahd | G
Zcngahd | G
Zcogahd | G
Zcpgahd | G
Zcqgahd | G
Zcrgahd | G
Zdsgahd | G
Zdtgahd | G
Zdugahd | G
Zdvgahd | G
Zdwgahd | G
Zdxgahd | G
Zdygahd | G
Zdzgahd | G
(644 rows)
-- lname | regexp_replace
-----------+----------------
-- Aadgahd | G
-- Abegahd | G
-- Abfgahd | G
--...............
--...............
-- Zdxgahd | G
-- Zdygahd | G
-- Zdzgahd | G
--(644 rows)
select DISTINCT lname, regexp_replace(lname, '...g...','...G...')
from phone_book_substr order by lname
;
lname | regexp_replace
---------+----------------
Aadgahd | ...G...
Abegahd | ...G...
Abfgahd | ...G...
Abggahd | ...G...
Abhgahd | ...G...
Abigahd | ...G...
Acjgahd | ...G...
Ackgahd | ...G...
Aclgahd | ...G...
Acmgahd | ...G...
Acngahd | ...G...
Acogahd | ...G...
Acpgahd | ...G...
Acqgahd | ...G...
Acrgahd | ...G...
Adsgahd | ...G...
Adtgahd | ...G...
Adugahd | ...G...
Advgahd | ...G...
Adwgahd | ...G...
Adxgahd | ...G...
Adygahd | ...G...
Adzgahd | ...G...
Badgahd | ...G...
Bbegahd | ...G...
Bbfgahd | ...G...
Bbggahd | ...G...
Bbhgahd | ...G...
Bbigahd | ...G...
Bcjgahd | ...G...
Bckgahd | ...G...
Bclgahd | ...G...
Bcmgahd | ...G...
Bcngahd | ...G...
Bcogahd | ...G...
Bcpgahd | ...G...
Bcqgahd | ...G...
Bcrgahd | ...G...
Bdsgahd | ...G...
Bdtgahd | ...G...
Bdugahd | ...G...
Bdvgahd | ...G...
Bdwgahd | ...G...
Bdxgahd | ...G...
Bdygahd | ...G...
Bdzgahd | ...G...
Cadgahd | ...G...
Cbegahd | ...G...
Cbfgahd | ...G...
Cbggahd | ...G...
Cbhgahd | ...G...
Cbigahd | ...G...
Ccjgahd | ...G...
Cckgahd | ...G...
Cclgahd | ...G...
Ccmgahd | ...G...
Ccngahd | ...G...
Ccogahd | ...G...
Ccpgahd | ...G...
Ccqgahd | ...G...
Ccrgahd | ...G...
Cdsgahd | ...G...
Cdtgahd | ...G...
Cdugahd | ...G...
Cdvgahd | ...G...
Cdwgahd | ...G...
Cdxgahd | ...G...
Cdygahd | ...G...
Cdzgahd | ...G...
Dadgahd | ...G...
Dbegahd | ...G...
Dbfgahd | ...G...
Dbggahd | ...G...
Dbhgahd | ...G...
Dbigahd | ...G...
Dcjgahd | ...G...
Dckgahd | ...G...
Dclgahd | ...G...
Dcmgahd | ...G...
Dcngahd | ...G...
Dcogahd | ...G...
Dcpgahd | ...G...
Dcqgahd | ...G...
Dcrgahd | ...G...
Ddsgahd | ...G...
Ddtgahd | ...G...
Ddugahd | ...G...
Ddvgahd | ...G...
Ddwgahd | ...G...
Ddxgahd | ...G...
Ddygahd | ...G...
Ddzgahd | ...G...
Eadgahd | ...G...
Ebegahd | ...G...
Ebfgahd | ...G...
Ebggahd | ...G...
Ebhgahd | ...G...
Ebigahd | ...G...
Ecjgahd | ...G...
Eckgahd | ...G...
Eclgahd | ...G...
Ecmgahd | ...G...
Ecngahd | ...G...
Ecogahd | ...G...
Ecpgahd | ...G...
Ecqgahd | ...G...
Ecrgahd | ...G...
Edsgahd | ...G...
Edtgahd | ...G...
Edugahd | ...G...
Edvgahd | ...G...
Edwgahd | ...G...
Edxgahd | ...G...
Edygahd | ...G...
Edzgahd | ...G...
Fadgahd | ...G...
Fbegahd | ...G...
Fbfgahd | ...G...
Fbggahd | ...G...
Fbhgahd | ...G...
Fbigahd | ...G...
Fcjgahd | ...G...
Fckgahd | ...G...
Fclgahd | ...G...
Fcmgahd | ...G...
Fcngahd | ...G...
Fcogahd | ...G...
Fcpgahd | ...G...
Fcqgahd | ...G...
Fcrgahd | ...G...
Fdsgahd | ...G...
Fdtgahd | ...G...
Fdugahd | ...G...
Fdvgahd | ...G...
Fdwgahd | ...G...
Fdxgahd | ...G...
Fdygahd | ...G...
Fdzgahd | ...G...
Gadgahd | ...G...
Gbegahd | ...G...
Gbfgahd | ...G...
Gbggahd | ...G...
Gbhgahd | ...G...
Gbigahd | ...G...
Gcjgahd | ...G...
Gckgahd | ...G...
Gclgahd | ...G...
Gcmgahd | ...G...
Gcngahd | ...G...
Gcogahd | ...G...
Gcpgahd | ...G...
Gcqgahd | ...G...
Gcrgahd | ...G...
Gdsgahd | ...G...
Gdtgahd | ...G...
Gdugahd | ...G...
Gdvgahd | ...G...
Gdwgahd | ...G...
Gdxgahd | ...G...
Gdygahd | ...G...
Gdzgahd | ...G...
Hadgahd | ...G...
Hbegahd | ...G...
Hbfgahd | ...G...
Hbggahd | ...G...
Hbhgahd | ...G...
Hbigahd | ...G...
Hcjgahd | ...G...
Hckgahd | ...G...
Hclgahd | ...G...
Hcmgahd | ...G...
Hcngahd | ...G...
Hcogahd | ...G...
Hcpgahd | ...G...
Hcqgahd | ...G...
Hcrgahd | ...G...
Hdsgahd | ...G...
Hdtgahd | ...G...
Hdugahd | ...G...
Hdvgahd | ...G...
Hdwgahd | ...G...
Hdxgahd | ...G...
Hdygahd | ...G...
Hdzgahd | ...G...
Iadgahd | ...G...
Ibegahd | ...G...
Ibfgahd | ...G...
Ibggahd | ...G...
Ibhgahd | ...G...
Ibigahd | ...G...
Icjgahd | ...G...
Ickgahd | ...G...
Iclgahd | ...G...
Icmgahd | ...G...
Icngahd | ...G...
Icogahd | ...G...
Icpgahd | ...G...
Icqgahd | ...G...
Icrgahd | ...G...
Idsgahd | ...G...
Idtgahd | ...G...
Idugahd | ...G...
Idvgahd | ...G...
Idwgahd | ...G...
Idxgahd | ...G...
Idygahd | ...G...
Idzgahd | ...G...
Jadgahd | ...G...
Jbegahd | ...G...
Jbfgahd | ...G...
Jbggahd | ...G...
Jbhgahd | ...G...
Jbigahd | ...G...
Jcjgahd | ...G...
Jckgahd | ...G...
Jclgahd | ...G...
Jcmgahd | ...G...
Jcngahd | ...G...
Jcogahd | ...G...
Jcpgahd | ...G...
Jcqgahd | ...G...
Jcrgahd | ...G...
Jdsgahd | ...G...
Jdtgahd | ...G...
Jdugahd | ...G...
Jdvgahd | ...G...
Jdwgahd | ...G...
Jdxgahd | ...G...
Jdygahd | ...G...
Jdzgahd | ...G...
Kadgahd | ...G...
Kbegahd | ...G...
Kbfgahd | ...G...
Kbggahd | ...G...
Kbhgahd | ...G...
Kbigahd | ...G...
Kcjgahd | ...G...
Kckgahd | ...G...
Kclgahd | ...G...
Kcmgahd | ...G...
Kcngahd | ...G...
Kcogahd | ...G...
Kcpgahd | ...G...
Kcqgahd | ...G...
Kcrgahd | ...G...
Kdsgahd | ...G...
Kdtgahd | ...G...
Kdugahd | ...G...
Kdvgahd | ...G...
Kdwgahd | ...G...
Kdxgahd | ...G...
Kdygahd | ...G...
Kdzgahd | ...G...
Kedgahd | ...G...
Keegahd | ...G...
Kefgahd | ...G...
Keggahd | ...G...
Kehgahd | ...G...
Keigahd | ...G...
Kejgahd | ...G...
Kekgahd | ...G...
Kelgahd | ...G...
Kemgahd | ...G...
Kengahd | ...G...
Keogahd | ...G...
Kepgahd | ...G...
Keqgahd | ...G...
Kergahd | ...G...
Kesgahd | ...G...
Ketgahd | ...G...
Keugahd | ...G...
Kevgahd | ...G...
Kewgahd | ...G...
Kexgahd | ...G...
Keygahd | ...G...
Kezgahd | ...G...
Ladgahd | ...G...
Lbegahd | ...G...
Lbfgahd | ...G...
Lbggahd | ...G...
Lbhgahd | ...G...
Lbigahd | ...G...
Lcjgahd | ...G...
Lckgahd | ...G...
Lclgahd | ...G...
Lcmgahd | ...G...
Lcngahd | ...G...
Lcogahd | ...G...
Lcpgahd | ...G...
Lcqgahd | ...G...
Lcrgahd | ...G...
Ldsgahd | ...G...
Ldtgahd | ...G...
Ldugahd | ...G...
Ldvgahd | ...G...
Ldwgahd | ...G...
Ldxgahd | ...G...
Ldygahd | ...G...
Ldzgahd | ...G...
Lidgahd | ...G...
Liegahd | ...G...
Lifgahd | ...G...
Liggahd | ...G...
Lihgahd | ...G...
Liigahd | ...G...
Lijgahd | ...G...
Likgahd | ...G...
Lilgahd | ...G...
Limgahd | ...G...
Lingahd | ...G...
Liogahd | ...G...
Lipgahd | ...G...
Liqgahd | ...G...
Lirgahd | ...G...
Lisgahd | ...G...
Litgahd | ...G...
Liugahd | ...G...
Livgahd | ...G...
Liwgahd | ...G...
Lixgahd | ...G...
Liygahd | ...G...
Lizgahd | ...G...
Madgahd | ...G...
Mbegahd | ...G...
Mbfgahd | ...G...
Mbggahd | ...G...
Mbhgahd | ...G...
Mbigahd | ...G...
Mcjgahd | ...G...
Mckgahd | ...G...
Mclgahd | ...G...
Mcmgahd | ...G...
Mcngahd | ...G...
Mcogahd | ...G...
Mcpgahd | ...G...
Mcqgahd | ...G...
Mcrgahd | ...G...
Mdsgahd | ...G...
Mdtgahd | ...G...
Mdugahd | ...G...
Mdvgahd | ...G...
Mdwgahd | ...G...
Mdxgahd | ...G...
Mdygahd | ...G...
Mdzgahd | ...G...
Modgahd | ...G...
Moegahd | ...G...
Mofgahd | ...G...
Moggahd | ...G...
Mohgahd | ...G...
Moigahd | ...G...
Mojgahd | ...G...
Mokgahd | ...G...
Molgahd | ...G...
Momgahd | ...G...
Mongahd | ...G...
Moogahd | ...G...
Mopgahd | ...G...
Moqgahd | ...G...
Morgahd | ...G...
Mosgahd | ...G...
Motgahd | ...G...
Mougahd | ...G...
Movgahd | ...G...
Mowgahd | ...G...
Moxgahd | ...G...
Moygahd | ...G...
Mozgahd | ...G...
Nadgahd | ...G...
Nbegahd | ...G...
Nbfgahd | ...G...
Nbggahd | ...G...
Nbhgahd | ...G...
Nbigahd | ...G...
Ncjgahd | ...G...
Nckgahd | ...G...
Nclgahd | ...G...
Ncmgahd | ...G...
Ncngahd | ...G...
Ncogahd | ...G...
Ncpgahd | ...G...
Ncqgahd | ...G...
Ncrgahd | ...G...
Ndsgahd | ...G...
Ndtgahd | ...G...
Ndugahd | ...G...
Ndvgahd | ...G...
Ndwgahd | ...G...
Ndxgahd | ...G...
Ndygahd | ...G...
Ndzgahd | ...G...
Nudgahd | ...G...
Nuegahd | ...G...
Nufgahd | ...G...
Nuggahd | ...G...
Nuhgahd | ...G...
Nuigahd | ...G...
Nujgahd | ...G...
Nukgahd | ...G...
Nulgahd | ...G...
Numgahd | ...G...
Nungahd | ...G...
Nuogahd | ...G...
Nupgahd | ...G...
Nuqgahd | ...G...
Nurgahd | ...G...
Nusgahd | ...G...
Nutgahd | ...G...
Nuugahd | ...G...
Nuvgahd | ...G...
Nuwgahd | ...G...
Nuxgahd | ...G...
Nuygahd | ...G...
Nuzgahd | ...G...
Oadgahd | ...G...
Obegahd | ...G...
Obfgahd | ...G...
Obggahd | ...G...
Obhgahd | ...G...
Obigahd | ...G...
Ocjgahd | ...G...
Ockgahd | ...G...
Oclgahd | ...G...
Ocmgahd | ...G...
Ocngahd | ...G...
Ocogahd | ...G...
Ocpgahd | ...G...
Ocqgahd | ...G...
Ocrgahd | ...G...
Odsgahd | ...G...
Odtgahd | ...G...
Odugahd | ...G...
Odvgahd | ...G...
Odwgahd | ...G...
Odxgahd | ...G...
Odygahd | ...G...
Odzgahd | ...G...
Padgahd | ...G...
Pbegahd | ...G...
Pbfgahd | ...G...
Pbggahd | ...G...
Pbhgahd | ...G...
Pbigahd | ...G...
Pcjgahd | ...G...
Pckgahd | ...G...
Pclgahd | ...G...
Pcmgahd | ...G...
Pcngahd | ...G...
Pcogahd | ...G...
Pcpgahd | ...G...
Pcqgahd | ...G...
Pcrgahd | ...G...
Pdsgahd | ...G...
Pdtgahd | ...G...
Pdugahd | ...G...
Pdvgahd | ...G...
Pdwgahd | ...G...
Pdxgahd | ...G...
Pdygahd | ...G...
Pdzgahd | ...G...
Radgahd | ...G...
Rbegahd | ...G...
Rbfgahd | ...G...
Rbggahd | ...G...
Rbhgahd | ...G...
Rbigahd | ...G...
Rcjgahd | ...G...
Rckgahd | ...G...
Rclgahd | ...G...
Rcmgahd | ...G...
Rcngahd | ...G...
Rcogahd | ...G...
Rcpgahd | ...G...
Rcqgahd | ...G...
Rcrgahd | ...G...
Rdsgahd | ...G...
Rdtgahd | ...G...
Rdugahd | ...G...
Rdvgahd | ...G...
Rdwgahd | ...G...
Rdxgahd | ...G...
Rdygahd | ...G...
Rdzgahd | ...G...
Sadgahd | ...G...
Sbegahd | ...G...
Sbfgahd | ...G...
Sbggahd | ...G...
Sbhgahd | ...G...
Sbigahd | ...G...
Scjgahd | ...G...
Sckgahd | ...G...
Sclgahd | ...G...
Scmgahd | ...G...
Scngahd | ...G...
Scogahd | ...G...
Scpgahd | ...G...
Scqgahd | ...G...
Scrgahd | ...G...
Sdsgahd | ...G...
Sdtgahd | ...G...
Sdugahd | ...G...
Sdvgahd | ...G...
Sdwgahd | ...G...
Sdxgahd | ...G...
Sdygahd | ...G...
Sdzgahd | ...G...
Uadgahd | ...G...
Ubegahd | ...G...
Ubfgahd | ...G...
Ubggahd | ...G...
Ubhgahd | ...G...
Ubigahd | ...G...
Ucjgahd | ...G...
Uckgahd | ...G...
Uclgahd | ...G...
Ucmgahd | ...G...
Ucngahd | ...G...
Ucogahd | ...G...
Ucpgahd | ...G...
Ucqgahd | ...G...
Ucrgahd | ...G...
Udsgahd | ...G...
Udtgahd | ...G...
Udugahd | ...G...
Udvgahd | ...G...
Udwgahd | ...G...
Udxgahd | ...G...
Udygahd | ...G...
Udzgahd | ...G...
Vadgahd | ...G...
Vbegahd | ...G...
Vbfgahd | ...G...
Vbggahd | ...G...
Vbhgahd | ...G...
Vbigahd | ...G...
Vcjgahd | ...G...
Vckgahd | ...G...
Vclgahd | ...G...
Vcmgahd | ...G...
Vcngahd | ...G...
Vcogahd | ...G...
Vcpgahd | ...G...
Vcqgahd | ...G...
Vcrgahd | ...G...
Vdsgahd | ...G...
Vdtgahd | ...G...
Vdugahd | ...G...
Vdvgahd | ...G...
Vdwgahd | ...G...
Vdxgahd | ...G...
Vdygahd | ...G...
Vdzgahd | ...G...
Wadgahd | ...G...
Wbegahd | ...G...
Wbfgahd | ...G...
Wbggahd | ...G...
Wbhgahd | ...G...
Wbigahd | ...G...
Wcjgahd | ...G...
Wckgahd | ...G...
Wclgahd | ...G...
Wcmgahd | ...G...
Wcngahd | ...G...
Wcogahd | ...G...
Wcpgahd | ...G...
Wcqgahd | ...G...
Wcrgahd | ...G...
Wdsgahd | ...G...
Wdtgahd | ...G...
Wdugahd | ...G...
Wdvgahd | ...G...
Wdwgahd | ...G...
Wdxgahd | ...G...
Wdygahd | ...G...
Wdzgahd | ...G...
Xadgahd | ...G...
Xbegahd | ...G...
Xbfgahd | ...G...
Xbggahd | ...G...
Xbhgahd | ...G...
Xbigahd | ...G...
Xcjgahd | ...G...
Xckgahd | ...G...
Xclgahd | ...G...
Xcmgahd | ...G...
Xcngahd | ...G...
Xcogahd | ...G...
Xcpgahd | ...G...
Xcqgahd | ...G...
Xcrgahd | ...G...
Xdsgahd | ...G...
Xdtgahd | ...G...
Xdugahd | ...G...
Xdvgahd | ...G...
Xdwgahd | ...G...
Xdxgahd | ...G...
Xdygahd | ...G...
Xdzgahd | ...G...
Yadgahd | ...G...
Ybegahd | ...G...
Ybfgahd | ...G...
Ybggahd | ...G...
Ybhgahd | ...G...
Ybigahd | ...G...
Ycjgahd | ...G...
Yckgahd | ...G...
Yclgahd | ...G...
Ycmgahd | ...G...
Ycngahd | ...G...
Ycogahd | ...G...
Ycpgahd | ...G...
Ycqgahd | ...G...
Ycrgahd | ...G...
Ydsgahd | ...G...
Ydtgahd | ...G...
Ydugahd | ...G...
Ydvgahd | ...G...
Ydwgahd | ...G...
Ydxgahd | ...G...
Ydygahd | ...G...
Ydzgahd | ...G...
Zadgahd | ...G...
Zbegahd | ...G...
Zbfgahd | ...G...
Zbggahd | ...G...
Zbhgahd | ...G...
Zbigahd | ...G...
Zcjgahd | ...G...
Zckgahd | ...G...
Zclgahd | ...G...
Zcmgahd | ...G...
Zcngahd | ...G...
Zcogahd | ...G...
Zcpgahd | ...G...
Zcqgahd | ...G...
Zcrgahd | ...G...
Zdsgahd | ...G...
Zdtgahd | ...G...
Zdugahd | ...G...
Zdvgahd | ...G...
Zdwgahd | ...G...
Zdxgahd | ...G...
Zdygahd | ...G...
Zdzgahd | ...G...
(644 rows)
-- lname | regexp_replace
-----------+----------------
-- Aadgahd | ...G...
-- Abegahd | ...G...
--...............
--...............
-- Zdxgahd | ...G...
-- Zdygahd | ...G...
-- Zdzgahd | ...G...
--(644 rows)
select DISTINCT lname, regexp_replace(lname, 'A..g..d','a..G..D')
from phone_book_substr order by lname
;
lname | regexp_replace
---------+----------------
Aadgahd | a..G..D
Abegahd | a..G..D
Abfgahd | a..G..D
Abggahd | a..G..D
Abhgahd | a..G..D
Abigahd | a..G..D
Acjgahd | a..G..D
Ackgahd | a..G..D
Aclgahd | a..G..D
Acmgahd | a..G..D
Acngahd | a..G..D
Acogahd | a..G..D
Acpgahd | a..G..D
Acqgahd | a..G..D
Acrgahd | a..G..D
Adsgahd | a..G..D
Adtgahd | a..G..D
Adugahd | a..G..D
Advgahd | a..G..D
Adwgahd | a..G..D
Adxgahd | a..G..D
Adygahd | a..G..D
Adzgahd | a..G..D
Badgahd | Badgahd
Bbegahd | Bbegahd
Bbfgahd | Bbfgahd
Bbggahd | Bbggahd
Bbhgahd | Bbhgahd
Bbigahd | Bbigahd
Bcjgahd | Bcjgahd
Bckgahd | Bckgahd
Bclgahd | Bclgahd
Bcmgahd | Bcmgahd
Bcngahd | Bcngahd
Bcogahd | Bcogahd
Bcpgahd | Bcpgahd
Bcqgahd | Bcqgahd
Bcrgahd | Bcrgahd
Bdsgahd | Bdsgahd
Bdtgahd | Bdtgahd
Bdugahd | Bdugahd
Bdvgahd | Bdvgahd
Bdwgahd | Bdwgahd
Bdxgahd | Bdxgahd
Bdygahd | Bdygahd
Bdzgahd | Bdzgahd
Cadgahd | Cadgahd
Cbegahd | Cbegahd
Cbfgahd | Cbfgahd
Cbggahd | Cbggahd
Cbhgahd | Cbhgahd
Cbigahd | Cbigahd
Ccjgahd | Ccjgahd
Cckgahd | Cckgahd
Cclgahd | Cclgahd
Ccmgahd | Ccmgahd
Ccngahd | Ccngahd
Ccogahd | Ccogahd
Ccpgahd | Ccpgahd
Ccqgahd | Ccqgahd
Ccrgahd | Ccrgahd
Cdsgahd | Cdsgahd
Cdtgahd | Cdtgahd
Cdugahd | Cdugahd
Cdvgahd | Cdvgahd
Cdwgahd | Cdwgahd
Cdxgahd | Cdxgahd
Cdygahd | Cdygahd
Cdzgahd | Cdzgahd
Dadgahd | Dadgahd
Dbegahd | Dbegahd
Dbfgahd | Dbfgahd
Dbggahd | Dbggahd
Dbhgahd | Dbhgahd
Dbigahd | Dbigahd
Dcjgahd | Dcjgahd
Dckgahd | Dckgahd
Dclgahd | Dclgahd
Dcmgahd | Dcmgahd
Dcngahd | Dcngahd
Dcogahd | Dcogahd
Dcpgahd | Dcpgahd
Dcqgahd | Dcqgahd
Dcrgahd | Dcrgahd
Ddsgahd | Ddsgahd
Ddtgahd | Ddtgahd
Ddugahd | Ddugahd
Ddvgahd | Ddvgahd
Ddwgahd | Ddwgahd
Ddxgahd | Ddxgahd
Ddygahd | Ddygahd
Ddzgahd | Ddzgahd
Eadgahd | Eadgahd
Ebegahd | Ebegahd
Ebfgahd | Ebfgahd
Ebggahd | Ebggahd
Ebhgahd | Ebhgahd
Ebigahd | Ebigahd
Ecjgahd | Ecjgahd
Eckgahd | Eckgahd
Eclgahd | Eclgahd
Ecmgahd | Ecmgahd
Ecngahd | Ecngahd
Ecogahd | Ecogahd
Ecpgahd | Ecpgahd
Ecqgahd | Ecqgahd
Ecrgahd | Ecrgahd
Edsgahd | Edsgahd
Edtgahd | Edtgahd
Edugahd | Edugahd
Edvgahd | Edvgahd
Edwgahd | Edwgahd
Edxgahd | Edxgahd
Edygahd | Edygahd
Edzgahd | Edzgahd
Fadgahd | Fadgahd
Fbegahd | Fbegahd
Fbfgahd | Fbfgahd
Fbggahd | Fbggahd
Fbhgahd | Fbhgahd
Fbigahd | Fbigahd
Fcjgahd | Fcjgahd
Fckgahd | Fckgahd
Fclgahd | Fclgahd
Fcmgahd | Fcmgahd
Fcngahd | Fcngahd
Fcogahd | Fcogahd
Fcpgahd | Fcpgahd
Fcqgahd | Fcqgahd
Fcrgahd | Fcrgahd
Fdsgahd | Fdsgahd
Fdtgahd | Fdtgahd
Fdugahd | Fdugahd
Fdvgahd | Fdvgahd
Fdwgahd | Fdwgahd
Fdxgahd | Fdxgahd
Fdygahd | Fdygahd
Fdzgahd | Fdzgahd
Gadgahd | Gadgahd
Gbegahd | Gbegahd
Gbfgahd | Gbfgahd
Gbggahd | Gbggahd
Gbhgahd | Gbhgahd
Gbigahd | Gbigahd
Gcjgahd | Gcjgahd
Gckgahd | Gckgahd
Gclgahd | Gclgahd
Gcmgahd | Gcmgahd
Gcngahd | Gcngahd
Gcogahd | Gcogahd
Gcpgahd | Gcpgahd
Gcqgahd | Gcqgahd
Gcrgahd | Gcrgahd
Gdsgahd | Gdsgahd
Gdtgahd | Gdtgahd
Gdugahd | Gdugahd
Gdvgahd | Gdvgahd
Gdwgahd | Gdwgahd
Gdxgahd | Gdxgahd
Gdygahd | Gdygahd
Gdzgahd | Gdzgahd
Hadgahd | Hadgahd
Hbegahd | Hbegahd
Hbfgahd | Hbfgahd
Hbggahd | Hbggahd
Hbhgahd | Hbhgahd
Hbigahd | Hbigahd
Hcjgahd | Hcjgahd
Hckgahd | Hckgahd
Hclgahd | Hclgahd
Hcmgahd | Hcmgahd
Hcngahd | Hcngahd
Hcogahd | Hcogahd
Hcpgahd | Hcpgahd
Hcqgahd | Hcqgahd
Hcrgahd | Hcrgahd
Hdsgahd | Hdsgahd
Hdtgahd | Hdtgahd
Hdugahd | Hdugahd
Hdvgahd | Hdvgahd
Hdwgahd | Hdwgahd
Hdxgahd | Hdxgahd
Hdygahd | Hdygahd
Hdzgahd | Hdzgahd
Iadgahd | Iadgahd
Ibegahd | Ibegahd
Ibfgahd | Ibfgahd
Ibggahd | Ibggahd
Ibhgahd | Ibhgahd
Ibigahd | Ibigahd
Icjgahd | Icjgahd
Ickgahd | Ickgahd
Iclgahd | Iclgahd
Icmgahd | Icmgahd
Icngahd | Icngahd
Icogahd | Icogahd
Icpgahd | Icpgahd
Icqgahd | Icqgahd
Icrgahd | Icrgahd
Idsgahd | Idsgahd
Idtgahd | Idtgahd
Idugahd | Idugahd
Idvgahd | Idvgahd
Idwgahd | Idwgahd
Idxgahd | Idxgahd
Idygahd | Idygahd
Idzgahd | Idzgahd
Jadgahd | Jadgahd
Jbegahd | Jbegahd
Jbfgahd | Jbfgahd
Jbggahd | Jbggahd
Jbhgahd | Jbhgahd
Jbigahd | Jbigahd
Jcjgahd | Jcjgahd
Jckgahd | Jckgahd
Jclgahd | Jclgahd
Jcmgahd | Jcmgahd
Jcngahd | Jcngahd
Jcogahd | Jcogahd
Jcpgahd | Jcpgahd
Jcqgahd | Jcqgahd
Jcrgahd | Jcrgahd
Jdsgahd | Jdsgahd
Jdtgahd | Jdtgahd
Jdugahd | Jdugahd
Jdvgahd | Jdvgahd
Jdwgahd | Jdwgahd
Jdxgahd | Jdxgahd
Jdygahd | Jdygahd
Jdzgahd | Jdzgahd
Kadgahd | Kadgahd
Kbegahd | Kbegahd
Kbfgahd | Kbfgahd
Kbggahd | Kbggahd
Kbhgahd | Kbhgahd
Kbigahd | Kbigahd
Kcjgahd | Kcjgahd
Kckgahd | Kckgahd
Kclgahd | Kclgahd
Kcmgahd | Kcmgahd
Kcngahd | Kcngahd
Kcogahd | Kcogahd
Kcpgahd | Kcpgahd
Kcqgahd | Kcqgahd
Kcrgahd | Kcrgahd
Kdsgahd | Kdsgahd
Kdtgahd | Kdtgahd
Kdugahd | Kdugahd
Kdvgahd | Kdvgahd
Kdwgahd | Kdwgahd
Kdxgahd | Kdxgahd
Kdygahd | Kdygahd
Kdzgahd | Kdzgahd
Kedgahd | Kedgahd
Keegahd | Keegahd
Kefgahd | Kefgahd
Keggahd | Keggahd
Kehgahd | Kehgahd
Keigahd | Keigahd
Kejgahd | Kejgahd
Kekgahd | Kekgahd
Kelgahd | Kelgahd
Kemgahd | Kemgahd
Kengahd | Kengahd
Keogahd | Keogahd
Kepgahd | Kepgahd
Keqgahd | Keqgahd
Kergahd | Kergahd
Kesgahd | Kesgahd
Ketgahd | Ketgahd
Keugahd | Keugahd
Kevgahd | Kevgahd
Kewgahd | Kewgahd
Kexgahd | Kexgahd
Keygahd | Keygahd
Kezgahd | Kezgahd
Ladgahd | Ladgahd
Lbegahd | Lbegahd
Lbfgahd | Lbfgahd
Lbggahd | Lbggahd
Lbhgahd | Lbhgahd
Lbigahd | Lbigahd
Lcjgahd | Lcjgahd
Lckgahd | Lckgahd
Lclgahd | Lclgahd
Lcmgahd | Lcmgahd
Lcngahd | Lcngahd
Lcogahd | Lcogahd
Lcpgahd | Lcpgahd
Lcqgahd | Lcqgahd
Lcrgahd | Lcrgahd
Ldsgahd | Ldsgahd
Ldtgahd | Ldtgahd
Ldugahd | Ldugahd
Ldvgahd | Ldvgahd
Ldwgahd | Ldwgahd
Ldxgahd | Ldxgahd
Ldygahd | Ldygahd
Ldzgahd | Ldzgahd
Lidgahd | Lidgahd
Liegahd | Liegahd
Lifgahd | Lifgahd
Liggahd | Liggahd
Lihgahd | Lihgahd
Liigahd | Liigahd
Lijgahd | Lijgahd
Likgahd | Likgahd
Lilgahd | Lilgahd
Limgahd | Limgahd
Lingahd | Lingahd
Liogahd | Liogahd
Lipgahd | Lipgahd
Liqgahd | Liqgahd
Lirgahd | Lirgahd
Lisgahd | Lisgahd
Litgahd | Litgahd
Liugahd | Liugahd
Livgahd | Livgahd
Liwgahd | Liwgahd
Lixgahd | Lixgahd
Liygahd | Liygahd
Lizgahd | Lizgahd
Madgahd | Madgahd
Mbegahd | Mbegahd
Mbfgahd | Mbfgahd
Mbggahd | Mbggahd
Mbhgahd | Mbhgahd
Mbigahd | Mbigahd
Mcjgahd | Mcjgahd
Mckgahd | Mckgahd
Mclgahd | Mclgahd
Mcmgahd | Mcmgahd
Mcngahd | Mcngahd
Mcogahd | Mcogahd
Mcpgahd | Mcpgahd
Mcqgahd | Mcqgahd
Mcrgahd | Mcrgahd
Mdsgahd | Mdsgahd
Mdtgahd | Mdtgahd
Mdugahd | Mdugahd
Mdvgahd | Mdvgahd
Mdwgahd | Mdwgahd
Mdxgahd | Mdxgahd
Mdygahd | Mdygahd
Mdzgahd | Mdzgahd
Modgahd | Modgahd
Moegahd | Moegahd
Mofgahd | Mofgahd
Moggahd | Moggahd
Mohgahd | Mohgahd
Moigahd | Moigahd
Mojgahd | Mojgahd
Mokgahd | Mokgahd
Molgahd | Molgahd
Momgahd | Momgahd
Mongahd | Mongahd
Moogahd | Moogahd
Mopgahd | Mopgahd
Moqgahd | Moqgahd
Morgahd | Morgahd
Mosgahd | Mosgahd
Motgahd | Motgahd
Mougahd | Mougahd
Movgahd | Movgahd
Mowgahd | Mowgahd
Moxgahd | Moxgahd
Moygahd | Moygahd
Mozgahd | Mozgahd
Nadgahd | Nadgahd
Nbegahd | Nbegahd
Nbfgahd | Nbfgahd
Nbggahd | Nbggahd
Nbhgahd | Nbhgahd
Nbigahd | Nbigahd
Ncjgahd | Ncjgahd
Nckgahd | Nckgahd
Nclgahd | Nclgahd
Ncmgahd | Ncmgahd
Ncngahd | Ncngahd
Ncogahd | Ncogahd
Ncpgahd | Ncpgahd
Ncqgahd | Ncqgahd
Ncrgahd | Ncrgahd
Ndsgahd | Ndsgahd
Ndtgahd | Ndtgahd
Ndugahd | Ndugahd
Ndvgahd | Ndvgahd
Ndwgahd | Ndwgahd
Ndxgahd | Ndxgahd
Ndygahd | Ndygahd
Ndzgahd | Ndzgahd
Nudgahd | Nudgahd
Nuegahd | Nuegahd
Nufgahd | Nufgahd
Nuggahd | Nuggahd
Nuhgahd | Nuhgahd
Nuigahd | Nuigahd
Nujgahd | Nujgahd
Nukgahd | Nukgahd
Nulgahd | Nulgahd
Numgahd | Numgahd
Nungahd | Nungahd
Nuogahd | Nuogahd
Nupgahd | Nupgahd
Nuqgahd | Nuqgahd
Nurgahd | Nurgahd
Nusgahd | Nusgahd
Nutgahd | Nutgahd
Nuugahd | Nuugahd
Nuvgahd | Nuvgahd
Nuwgahd | Nuwgahd
Nuxgahd | Nuxgahd
Nuygahd | Nuygahd
Nuzgahd | Nuzgahd
Oadgahd | Oadgahd
Obegahd | Obegahd
Obfgahd | Obfgahd
Obggahd | Obggahd
Obhgahd | Obhgahd
Obigahd | Obigahd
Ocjgahd | Ocjgahd
Ockgahd | Ockgahd
Oclgahd | Oclgahd
Ocmgahd | Ocmgahd
Ocngahd | Ocngahd
Ocogahd | Ocogahd
Ocpgahd | Ocpgahd
Ocqgahd | Ocqgahd
Ocrgahd | Ocrgahd
Odsgahd | Odsgahd
Odtgahd | Odtgahd
Odugahd | Odugahd
Odvgahd | Odvgahd
Odwgahd | Odwgahd
Odxgahd | Odxgahd
Odygahd | Odygahd
Odzgahd | Odzgahd
Padgahd | Padgahd
Pbegahd | Pbegahd
Pbfgahd | Pbfgahd
Pbggahd | Pbggahd
Pbhgahd | Pbhgahd
Pbigahd | Pbigahd
Pcjgahd | Pcjgahd
Pckgahd | Pckgahd
Pclgahd | Pclgahd
Pcmgahd | Pcmgahd
Pcngahd | Pcngahd
Pcogahd | Pcogahd
Pcpgahd | Pcpgahd
Pcqgahd | Pcqgahd
Pcrgahd | Pcrgahd
Pdsgahd | Pdsgahd
Pdtgahd | Pdtgahd
Pdugahd | Pdugahd
Pdvgahd | Pdvgahd
Pdwgahd | Pdwgahd
Pdxgahd | Pdxgahd
Pdygahd | Pdygahd
Pdzgahd | Pdzgahd
Radgahd | Radgahd
Rbegahd | Rbegahd
Rbfgahd | Rbfgahd
Rbggahd | Rbggahd
Rbhgahd | Rbhgahd
Rbigahd | Rbigahd
Rcjgahd | Rcjgahd
Rckgahd | Rckgahd
Rclgahd | Rclgahd
Rcmgahd | Rcmgahd
Rcngahd | Rcngahd
Rcogahd | Rcogahd
Rcpgahd | Rcpgahd
Rcqgahd | Rcqgahd
Rcrgahd | Rcrgahd
Rdsgahd | Rdsgahd
Rdtgahd | Rdtgahd
Rdugahd | Rdugahd
Rdvgahd | Rdvgahd
Rdwgahd | Rdwgahd
Rdxgahd | Rdxgahd
Rdygahd | Rdygahd
Rdzgahd | Rdzgahd
Sadgahd | Sadgahd
Sbegahd | Sbegahd
Sbfgahd | Sbfgahd
Sbggahd | Sbggahd
Sbhgahd | Sbhgahd
Sbigahd | Sbigahd
Scjgahd | Scjgahd
Sckgahd | Sckgahd
Sclgahd | Sclgahd
Scmgahd | Scmgahd
Scngahd | Scngahd
Scogahd | Scogahd
Scpgahd | Scpgahd
Scqgahd | Scqgahd
Scrgahd | Scrgahd
Sdsgahd | Sdsgahd
Sdtgahd | Sdtgahd
Sdugahd | Sdugahd
Sdvgahd | Sdvgahd
Sdwgahd | Sdwgahd
Sdxgahd | Sdxgahd
Sdygahd | Sdygahd
Sdzgahd | Sdzgahd
Uadgahd | Uadgahd
Ubegahd | Ubegahd
Ubfgahd | Ubfgahd
Ubggahd | Ubggahd
Ubhgahd | Ubhgahd
Ubigahd | Ubigahd
Ucjgahd | Ucjgahd
Uckgahd | Uckgahd
Uclgahd | Uclgahd
Ucmgahd | Ucmgahd
Ucngahd | Ucngahd
Ucogahd | Ucogahd
Ucpgahd | Ucpgahd
Ucqgahd | Ucqgahd
Ucrgahd | Ucrgahd
Udsgahd | Udsgahd
Udtgahd | Udtgahd
Udugahd | Udugahd
Udvgahd | Udvgahd
Udwgahd | Udwgahd
Udxgahd | Udxgahd
Udygahd | Udygahd
Udzgahd | Udzgahd
Vadgahd | Vadgahd
Vbegahd | Vbegahd
Vbfgahd | Vbfgahd
Vbggahd | Vbggahd
Vbhgahd | Vbhgahd
Vbigahd | Vbigahd
Vcjgahd | Vcjgahd
Vckgahd | Vckgahd
Vclgahd | Vclgahd
Vcmgahd | Vcmgahd
Vcngahd | Vcngahd
Vcogahd | Vcogahd
Vcpgahd | Vcpgahd
Vcqgahd | Vcqgahd
Vcrgahd | Vcrgahd
Vdsgahd | Vdsgahd
Vdtgahd | Vdtgahd
Vdugahd | Vdugahd
Vdvgahd | Vdvgahd
Vdwgahd | Vdwgahd
Vdxgahd | Vdxgahd
Vdygahd | Vdygahd
Vdzgahd | Vdzgahd
Wadgahd | Wadgahd
Wbegahd | Wbegahd
Wbfgahd | Wbfgahd
Wbggahd | Wbggahd
Wbhgahd | Wbhgahd
Wbigahd | Wbigahd
Wcjgahd | Wcjgahd
Wckgahd | Wckgahd
Wclgahd | Wclgahd
Wcmgahd | Wcmgahd
Wcngahd | Wcngahd
Wcogahd | Wcogahd
Wcpgahd | Wcpgahd
Wcqgahd | Wcqgahd
Wcrgahd | Wcrgahd
Wdsgahd | Wdsgahd
Wdtgahd | Wdtgahd
Wdugahd | Wdugahd
Wdvgahd | Wdvgahd
Wdwgahd | Wdwgahd
Wdxgahd | Wdxgahd
Wdygahd | Wdygahd
Wdzgahd | Wdzgahd
Xadgahd | Xadgahd
Xbegahd | Xbegahd
Xbfgahd | Xbfgahd
Xbggahd | Xbggahd
Xbhgahd | Xbhgahd
Xbigahd | Xbigahd
Xcjgahd | Xcjgahd
Xckgahd | Xckgahd
Xclgahd | Xclgahd
Xcmgahd | Xcmgahd
Xcngahd | Xcngahd
Xcogahd | Xcogahd
Xcpgahd | Xcpgahd
Xcqgahd | Xcqgahd
Xcrgahd | Xcrgahd
Xdsgahd | Xdsgahd
Xdtgahd | Xdtgahd
Xdugahd | Xdugahd
Xdvgahd | Xdvgahd
Xdwgahd | Xdwgahd
Xdxgahd | Xdxgahd
Xdygahd | Xdygahd
Xdzgahd | Xdzgahd
Yadgahd | Yadgahd
Ybegahd | Ybegahd
Ybfgahd | Ybfgahd
Ybggahd | Ybggahd
Ybhgahd | Ybhgahd
Ybigahd | Ybigahd
Ycjgahd | Ycjgahd
Yckgahd | Yckgahd
Yclgahd | Yclgahd
Ycmgahd | Ycmgahd
Ycngahd | Ycngahd
Ycogahd | Ycogahd
Ycpgahd | Ycpgahd
Ycqgahd | Ycqgahd
Ycrgahd | Ycrgahd
Ydsgahd | Ydsgahd
Ydtgahd | Ydtgahd
Ydugahd | Ydugahd
Ydvgahd | Ydvgahd
Ydwgahd | Ydwgahd
Ydxgahd | Ydxgahd
Ydygahd | Ydygahd
Ydzgahd | Ydzgahd
Zadgahd | Zadgahd
Zbegahd | Zbegahd
Zbfgahd | Zbfgahd
Zbggahd | Zbggahd
Zbhgahd | Zbhgahd
Zbigahd | Zbigahd
Zcjgahd | Zcjgahd
Zckgahd | Zckgahd
Zclgahd | Zclgahd
Zcmgahd | Zcmgahd
Zcngahd | Zcngahd
Zcogahd | Zcogahd
Zcpgahd | Zcpgahd
Zcqgahd | Zcqgahd
Zcrgahd | Zcrgahd
Zdsgahd | Zdsgahd
Zdtgahd | Zdtgahd
Zdugahd | Zdugahd
Zdvgahd | Zdvgahd
Zdwgahd | Zdwgahd
Zdxgahd | Zdxgahd
Zdygahd | Zdygahd
Zdzgahd | Zdzgahd
(644 rows)
-- lname | regexp_replace
-----------+----------------
-- Aadgahd | a..G..D
-- Abegahd | a..G..D
-- Abfgahd | a..G..D
--...............
--...............
-- Adzgahd | a..G..D
-- Badgahd | Badgahd
-- Bbegahd | Bbegahd
--...............
--...............
-- Zdxgahd | Zdxgahd
-- Zdygahd | Zdygahd
-- Zdzgahd | Zdzgahd
--(644 rows)
select DISTINCT lname, regexp_replace(lname, 'a','Z','ig')
from phone_book_substr order by lname
;
lname | regexp_replace
---------+----------------
Aadgahd | ZZdgZhd
Abegahd | ZbegZhd
Abfgahd | ZbfgZhd
Abggahd | ZbggZhd
Abhgahd | ZbhgZhd
Abigahd | ZbigZhd
Acjgahd | ZcjgZhd
Ackgahd | ZckgZhd
Aclgahd | ZclgZhd
Acmgahd | ZcmgZhd
Acngahd | ZcngZhd
Acogahd | ZcogZhd
Acpgahd | ZcpgZhd
Acqgahd | ZcqgZhd
Acrgahd | ZcrgZhd
Adsgahd | ZdsgZhd
Adtgahd | ZdtgZhd
Adugahd | ZdugZhd
Advgahd | ZdvgZhd
Adwgahd | ZdwgZhd
Adxgahd | ZdxgZhd
Adygahd | ZdygZhd
Adzgahd | ZdzgZhd
Badgahd | BZdgZhd
Bbegahd | BbegZhd
Bbfgahd | BbfgZhd
Bbggahd | BbggZhd
Bbhgahd | BbhgZhd
Bbigahd | BbigZhd
Bcjgahd | BcjgZhd
Bckgahd | BckgZhd
Bclgahd | BclgZhd
Bcmgahd | BcmgZhd
Bcngahd | BcngZhd
Bcogahd | BcogZhd
Bcpgahd | BcpgZhd
Bcqgahd | BcqgZhd
Bcrgahd | BcrgZhd
Bdsgahd | BdsgZhd
Bdtgahd | BdtgZhd
Bdugahd | BdugZhd
Bdvgahd | BdvgZhd
Bdwgahd | BdwgZhd
Bdxgahd | BdxgZhd
Bdygahd | BdygZhd
Bdzgahd | BdzgZhd
Cadgahd | CZdgZhd
Cbegahd | CbegZhd
Cbfgahd | CbfgZhd
Cbggahd | CbggZhd
Cbhgahd | CbhgZhd
Cbigahd | CbigZhd
Ccjgahd | CcjgZhd
Cckgahd | CckgZhd
Cclgahd | CclgZhd
Ccmgahd | CcmgZhd
Ccngahd | CcngZhd
Ccogahd | CcogZhd
Ccpgahd | CcpgZhd
Ccqgahd | CcqgZhd
Ccrgahd | CcrgZhd
Cdsgahd | CdsgZhd
Cdtgahd | CdtgZhd
Cdugahd | CdugZhd
Cdvgahd | CdvgZhd
Cdwgahd | CdwgZhd
Cdxgahd | CdxgZhd
Cdygahd | CdygZhd
Cdzgahd | CdzgZhd
Dadgahd | DZdgZhd
Dbegahd | DbegZhd
Dbfgahd | DbfgZhd
Dbggahd | DbggZhd
Dbhgahd | DbhgZhd
Dbigahd | DbigZhd
Dcjgahd | DcjgZhd
Dckgahd | DckgZhd
Dclgahd | DclgZhd
Dcmgahd | DcmgZhd
Dcngahd | DcngZhd
Dcogahd | DcogZhd
Dcpgahd | DcpgZhd
Dcqgahd | DcqgZhd
Dcrgahd | DcrgZhd
Ddsgahd | DdsgZhd
Ddtgahd | DdtgZhd
Ddugahd | DdugZhd
Ddvgahd | DdvgZhd
Ddwgahd | DdwgZhd
Ddxgahd | DdxgZhd
Ddygahd | DdygZhd
Ddzgahd | DdzgZhd
Eadgahd | EZdgZhd
Ebegahd | EbegZhd
Ebfgahd | EbfgZhd
Ebggahd | EbggZhd
Ebhgahd | EbhgZhd
Ebigahd | EbigZhd
Ecjgahd | EcjgZhd
Eckgahd | EckgZhd
Eclgahd | EclgZhd
Ecmgahd | EcmgZhd
Ecngahd | EcngZhd
Ecogahd | EcogZhd
Ecpgahd | EcpgZhd
Ecqgahd | EcqgZhd
Ecrgahd | EcrgZhd
Edsgahd | EdsgZhd
Edtgahd | EdtgZhd
Edugahd | EdugZhd
Edvgahd | EdvgZhd
Edwgahd | EdwgZhd
Edxgahd | EdxgZhd
Edygahd | EdygZhd
Edzgahd | EdzgZhd
Fadgahd | FZdgZhd
Fbegahd | FbegZhd
Fbfgahd | FbfgZhd
Fbggahd | FbggZhd
Fbhgahd | FbhgZhd
Fbigahd | FbigZhd
Fcjgahd | FcjgZhd
Fckgahd | FckgZhd
Fclgahd | FclgZhd
Fcmgahd | FcmgZhd
Fcngahd | FcngZhd
Fcogahd | FcogZhd
Fcpgahd | FcpgZhd
Fcqgahd | FcqgZhd
Fcrgahd | FcrgZhd
Fdsgahd | FdsgZhd
Fdtgahd | FdtgZhd
Fdugahd | FdugZhd
Fdvgahd | FdvgZhd
Fdwgahd | FdwgZhd
Fdxgahd | FdxgZhd
Fdygahd | FdygZhd
Fdzgahd | FdzgZhd
Gadgahd | GZdgZhd
Gbegahd | GbegZhd
Gbfgahd | GbfgZhd
Gbggahd | GbggZhd
Gbhgahd | GbhgZhd
Gbigahd | GbigZhd
Gcjgahd | GcjgZhd
Gckgahd | GckgZhd
Gclgahd | GclgZhd
Gcmgahd | GcmgZhd
Gcngahd | GcngZhd
Gcogahd | GcogZhd
Gcpgahd | GcpgZhd
Gcqgahd | GcqgZhd
Gcrgahd | GcrgZhd
Gdsgahd | GdsgZhd
Gdtgahd | GdtgZhd
Gdugahd | GdugZhd
Gdvgahd | GdvgZhd
Gdwgahd | GdwgZhd
Gdxgahd | GdxgZhd
Gdygahd | GdygZhd
Gdzgahd | GdzgZhd
Hadgahd | HZdgZhd
Hbegahd | HbegZhd
Hbfgahd | HbfgZhd
Hbggahd | HbggZhd
Hbhgahd | HbhgZhd
Hbigahd | HbigZhd
Hcjgahd | HcjgZhd
Hckgahd | HckgZhd
Hclgahd | HclgZhd
Hcmgahd | HcmgZhd
Hcngahd | HcngZhd
Hcogahd | HcogZhd
Hcpgahd | HcpgZhd
Hcqgahd | HcqgZhd
Hcrgahd | HcrgZhd
Hdsgahd | HdsgZhd
Hdtgahd | HdtgZhd
Hdugahd | HdugZhd
Hdvgahd | HdvgZhd
Hdwgahd | HdwgZhd
Hdxgahd | HdxgZhd
Hdygahd | HdygZhd
Hdzgahd | HdzgZhd
Iadgahd | IZdgZhd
Ibegahd | IbegZhd
Ibfgahd | IbfgZhd
Ibggahd | IbggZhd
Ibhgahd | IbhgZhd
Ibigahd | IbigZhd
Icjgahd | IcjgZhd
Ickgahd | IckgZhd
Iclgahd | IclgZhd
Icmgahd | IcmgZhd
Icngahd | IcngZhd
Icogahd | IcogZhd
Icpgahd | IcpgZhd
Icqgahd | IcqgZhd
Icrgahd | IcrgZhd
Idsgahd | IdsgZhd
Idtgahd | IdtgZhd
Idugahd | IdugZhd
Idvgahd | IdvgZhd
Idwgahd | IdwgZhd
Idxgahd | IdxgZhd
Idygahd | IdygZhd
Idzgahd | IdzgZhd
Jadgahd | JZdgZhd
Jbegahd | JbegZhd
Jbfgahd | JbfgZhd
Jbggahd | JbggZhd
Jbhgahd | JbhgZhd
Jbigahd | JbigZhd
Jcjgahd | JcjgZhd
Jckgahd | JckgZhd
Jclgahd | JclgZhd
Jcmgahd | JcmgZhd
Jcngahd | JcngZhd
Jcogahd | JcogZhd
Jcpgahd | JcpgZhd
Jcqgahd | JcqgZhd
Jcrgahd | JcrgZhd
Jdsgahd | JdsgZhd
Jdtgahd | JdtgZhd
Jdugahd | JdugZhd
Jdvgahd | JdvgZhd
Jdwgahd | JdwgZhd
Jdxgahd | JdxgZhd
Jdygahd | JdygZhd
Jdzgahd | JdzgZhd
Kadgahd | KZdgZhd
Kbegahd | KbegZhd
Kbfgahd | KbfgZhd
Kbggahd | KbggZhd
Kbhgahd | KbhgZhd
Kbigahd | KbigZhd
Kcjgahd | KcjgZhd
Kckgahd | KckgZhd
Kclgahd | KclgZhd
Kcmgahd | KcmgZhd
Kcngahd | KcngZhd
Kcogahd | KcogZhd
Kcpgahd | KcpgZhd
Kcqgahd | KcqgZhd
Kcrgahd | KcrgZhd
Kdsgahd | KdsgZhd
Kdtgahd | KdtgZhd
Kdugahd | KdugZhd
Kdvgahd | KdvgZhd
Kdwgahd | KdwgZhd
Kdxgahd | KdxgZhd
Kdygahd | KdygZhd
Kdzgahd | KdzgZhd
Kedgahd | KedgZhd
Keegahd | KeegZhd
Kefgahd | KefgZhd
Keggahd | KeggZhd
Kehgahd | KehgZhd
Keigahd | KeigZhd
Kejgahd | KejgZhd
Kekgahd | KekgZhd
Kelgahd | KelgZhd
Kemgahd | KemgZhd
Kengahd | KengZhd
Keogahd | KeogZhd
Kepgahd | KepgZhd
Keqgahd | KeqgZhd
Kergahd | KergZhd
Kesgahd | KesgZhd
Ketgahd | KetgZhd
Keugahd | KeugZhd
Kevgahd | KevgZhd
Kewgahd | KewgZhd
Kexgahd | KexgZhd
Keygahd | KeygZhd
Kezgahd | KezgZhd
Ladgahd | LZdgZhd
Lbegahd | LbegZhd
Lbfgahd | LbfgZhd
Lbggahd | LbggZhd
Lbhgahd | LbhgZhd
Lbigahd | LbigZhd
Lcjgahd | LcjgZhd
Lckgahd | LckgZhd
Lclgahd | LclgZhd
Lcmgahd | LcmgZhd
Lcngahd | LcngZhd
Lcogahd | LcogZhd
Lcpgahd | LcpgZhd
Lcqgahd | LcqgZhd
Lcrgahd | LcrgZhd
Ldsgahd | LdsgZhd
Ldtgahd | LdtgZhd
Ldugahd | LdugZhd
Ldvgahd | LdvgZhd
Ldwgahd | LdwgZhd
Ldxgahd | LdxgZhd
Ldygahd | LdygZhd
Ldzgahd | LdzgZhd
Lidgahd | LidgZhd
Liegahd | LiegZhd
Lifgahd | LifgZhd
Liggahd | LiggZhd
Lihgahd | LihgZhd
Liigahd | LiigZhd
Lijgahd | LijgZhd
Likgahd | LikgZhd
Lilgahd | LilgZhd
Limgahd | LimgZhd
Lingahd | LingZhd
Liogahd | LiogZhd
Lipgahd | LipgZhd
Liqgahd | LiqgZhd
Lirgahd | LirgZhd
Lisgahd | LisgZhd
Litgahd | LitgZhd
Liugahd | LiugZhd
Livgahd | LivgZhd
Liwgahd | LiwgZhd
Lixgahd | LixgZhd
Liygahd | LiygZhd
Lizgahd | LizgZhd
Madgahd | MZdgZhd
Mbegahd | MbegZhd
Mbfgahd | MbfgZhd
Mbggahd | MbggZhd
Mbhgahd | MbhgZhd
Mbigahd | MbigZhd
Mcjgahd | McjgZhd
Mckgahd | MckgZhd
Mclgahd | MclgZhd
Mcmgahd | McmgZhd
Mcngahd | McngZhd
Mcogahd | McogZhd
Mcpgahd | McpgZhd
Mcqgahd | McqgZhd
Mcrgahd | McrgZhd
Mdsgahd | MdsgZhd
Mdtgahd | MdtgZhd
Mdugahd | MdugZhd
Mdvgahd | MdvgZhd
Mdwgahd | MdwgZhd
Mdxgahd | MdxgZhd
Mdygahd | MdygZhd
Mdzgahd | MdzgZhd
Modgahd | ModgZhd
Moegahd | MoegZhd
Mofgahd | MofgZhd
Moggahd | MoggZhd
Mohgahd | MohgZhd
Moigahd | MoigZhd
Mojgahd | MojgZhd
Mokgahd | MokgZhd
Molgahd | MolgZhd
Momgahd | MomgZhd
Mongahd | MongZhd
Moogahd | MoogZhd
Mopgahd | MopgZhd
Moqgahd | MoqgZhd
Morgahd | MorgZhd
Mosgahd | MosgZhd
Motgahd | MotgZhd
Mougahd | MougZhd
Movgahd | MovgZhd
Mowgahd | MowgZhd
Moxgahd | MoxgZhd
Moygahd | MoygZhd
Mozgahd | MozgZhd
Nadgahd | NZdgZhd
Nbegahd | NbegZhd
Nbfgahd | NbfgZhd
Nbggahd | NbggZhd
Nbhgahd | NbhgZhd
Nbigahd | NbigZhd
Ncjgahd | NcjgZhd
Nckgahd | NckgZhd
Nclgahd | NclgZhd
Ncmgahd | NcmgZhd
Ncngahd | NcngZhd
Ncogahd | NcogZhd
Ncpgahd | NcpgZhd
Ncqgahd | NcqgZhd
Ncrgahd | NcrgZhd
Ndsgahd | NdsgZhd
Ndtgahd | NdtgZhd
Ndugahd | NdugZhd
Ndvgahd | NdvgZhd
Ndwgahd | NdwgZhd
Ndxgahd | NdxgZhd
Ndygahd | NdygZhd
Ndzgahd | NdzgZhd
Nudgahd | NudgZhd
Nuegahd | NuegZhd
Nufgahd | NufgZhd
Nuggahd | NuggZhd
Nuhgahd | NuhgZhd
Nuigahd | NuigZhd
Nujgahd | NujgZhd
Nukgahd | NukgZhd
Nulgahd | NulgZhd
Numgahd | NumgZhd
Nungahd | NungZhd
Nuogahd | NuogZhd
Nupgahd | NupgZhd
Nuqgahd | NuqgZhd
Nurgahd | NurgZhd
Nusgahd | NusgZhd
Nutgahd | NutgZhd
Nuugahd | NuugZhd
Nuvgahd | NuvgZhd
Nuwgahd | NuwgZhd
Nuxgahd | NuxgZhd
Nuygahd | NuygZhd
Nuzgahd | NuzgZhd
Oadgahd | OZdgZhd
Obegahd | ObegZhd
Obfgahd | ObfgZhd
Obggahd | ObggZhd
Obhgahd | ObhgZhd
Obigahd | ObigZhd
Ocjgahd | OcjgZhd
Ockgahd | OckgZhd
Oclgahd | OclgZhd
Ocmgahd | OcmgZhd
Ocngahd | OcngZhd
Ocogahd | OcogZhd
Ocpgahd | OcpgZhd
Ocqgahd | OcqgZhd
Ocrgahd | OcrgZhd
Odsgahd | OdsgZhd
Odtgahd | OdtgZhd
Odugahd | OdugZhd
Odvgahd | OdvgZhd
Odwgahd | OdwgZhd
Odxgahd | OdxgZhd
Odygahd | OdygZhd
Odzgahd | OdzgZhd
Padgahd | PZdgZhd
Pbegahd | PbegZhd
Pbfgahd | PbfgZhd
Pbggahd | PbggZhd
Pbhgahd | PbhgZhd
Pbigahd | PbigZhd
Pcjgahd | PcjgZhd
Pckgahd | PckgZhd
Pclgahd | PclgZhd
Pcmgahd | PcmgZhd
Pcngahd | PcngZhd
Pcogahd | PcogZhd
Pcpgahd | PcpgZhd
Pcqgahd | PcqgZhd
Pcrgahd | PcrgZhd
Pdsgahd | PdsgZhd
Pdtgahd | PdtgZhd
Pdugahd | PdugZhd
Pdvgahd | PdvgZhd
Pdwgahd | PdwgZhd
Pdxgahd | PdxgZhd
Pdygahd | PdygZhd
Pdzgahd | PdzgZhd
Radgahd | RZdgZhd
Rbegahd | RbegZhd
Rbfgahd | RbfgZhd
Rbggahd | RbggZhd
Rbhgahd | RbhgZhd
Rbigahd | RbigZhd
Rcjgahd | RcjgZhd
Rckgahd | RckgZhd
Rclgahd | RclgZhd
Rcmgahd | RcmgZhd
Rcngahd | RcngZhd
Rcogahd | RcogZhd
Rcpgahd | RcpgZhd
Rcqgahd | RcqgZhd
Rcrgahd | RcrgZhd
Rdsgahd | RdsgZhd
Rdtgahd | RdtgZhd
Rdugahd | RdugZhd
Rdvgahd | RdvgZhd
Rdwgahd | RdwgZhd
Rdxgahd | RdxgZhd
Rdygahd | RdygZhd
Rdzgahd | RdzgZhd
Sadgahd | SZdgZhd
Sbegahd | SbegZhd
Sbfgahd | SbfgZhd
Sbggahd | SbggZhd
Sbhgahd | SbhgZhd
Sbigahd | SbigZhd
Scjgahd | ScjgZhd
Sckgahd | SckgZhd
Sclgahd | SclgZhd
Scmgahd | ScmgZhd
Scngahd | ScngZhd
Scogahd | ScogZhd
Scpgahd | ScpgZhd
Scqgahd | ScqgZhd
Scrgahd | ScrgZhd
Sdsgahd | SdsgZhd
Sdtgahd | SdtgZhd
Sdugahd | SdugZhd
Sdvgahd | SdvgZhd
Sdwgahd | SdwgZhd
Sdxgahd | SdxgZhd
Sdygahd | SdygZhd
Sdzgahd | SdzgZhd
Uadgahd | UZdgZhd
Ubegahd | UbegZhd
Ubfgahd | UbfgZhd
Ubggahd | UbggZhd
Ubhgahd | UbhgZhd
Ubigahd | UbigZhd
Ucjgahd | UcjgZhd
Uckgahd | UckgZhd
Uclgahd | UclgZhd
Ucmgahd | UcmgZhd
Ucngahd | UcngZhd
Ucogahd | UcogZhd
Ucpgahd | UcpgZhd
Ucqgahd | UcqgZhd
Ucrgahd | UcrgZhd
Udsgahd | UdsgZhd
Udtgahd | UdtgZhd
Udugahd | UdugZhd
Udvgahd | UdvgZhd
Udwgahd | UdwgZhd
Udxgahd | UdxgZhd
Udygahd | UdygZhd
Udzgahd | UdzgZhd
Vadgahd | VZdgZhd
Vbegahd | VbegZhd
Vbfgahd | VbfgZhd
Vbggahd | VbggZhd
Vbhgahd | VbhgZhd
Vbigahd | VbigZhd
Vcjgahd | VcjgZhd
Vckgahd | VckgZhd
Vclgahd | VclgZhd
Vcmgahd | VcmgZhd
Vcngahd | VcngZhd
Vcogahd | VcogZhd
Vcpgahd | VcpgZhd
Vcqgahd | VcqgZhd
Vcrgahd | VcrgZhd
Vdsgahd | VdsgZhd
Vdtgahd | VdtgZhd
Vdugahd | VdugZhd
Vdvgahd | VdvgZhd
Vdwgahd | VdwgZhd
Vdxgahd | VdxgZhd
Vdygahd | VdygZhd
Vdzgahd | VdzgZhd
Wadgahd | WZdgZhd
Wbegahd | WbegZhd
Wbfgahd | WbfgZhd
Wbggahd | WbggZhd
Wbhgahd | WbhgZhd
Wbigahd | WbigZhd
Wcjgahd | WcjgZhd
Wckgahd | WckgZhd
Wclgahd | WclgZhd
Wcmgahd | WcmgZhd
Wcngahd | WcngZhd
Wcogahd | WcogZhd
Wcpgahd | WcpgZhd
Wcqgahd | WcqgZhd
Wcrgahd | WcrgZhd
Wdsgahd | WdsgZhd
Wdtgahd | WdtgZhd
Wdugahd | WdugZhd
Wdvgahd | WdvgZhd
Wdwgahd | WdwgZhd
Wdxgahd | WdxgZhd
Wdygahd | WdygZhd
Wdzgahd | WdzgZhd
Xadgahd | XZdgZhd
Xbegahd | XbegZhd
Xbfgahd | XbfgZhd
Xbggahd | XbggZhd
Xbhgahd | XbhgZhd
Xbigahd | XbigZhd
Xcjgahd | XcjgZhd
Xckgahd | XckgZhd
Xclgahd | XclgZhd
Xcmgahd | XcmgZhd
Xcngahd | XcngZhd
Xcogahd | XcogZhd
Xcpgahd | XcpgZhd
Xcqgahd | XcqgZhd
Xcrgahd | XcrgZhd
Xdsgahd | XdsgZhd
Xdtgahd | XdtgZhd
Xdugahd | XdugZhd
Xdvgahd | XdvgZhd
Xdwgahd | XdwgZhd
Xdxgahd | XdxgZhd
Xdygahd | XdygZhd
Xdzgahd | XdzgZhd
Yadgahd | YZdgZhd
Ybegahd | YbegZhd
Ybfgahd | YbfgZhd
Ybggahd | YbggZhd
Ybhgahd | YbhgZhd
Ybigahd | YbigZhd
Ycjgahd | YcjgZhd
Yckgahd | YckgZhd
Yclgahd | YclgZhd
Ycmgahd | YcmgZhd
Ycngahd | YcngZhd
Ycogahd | YcogZhd
Ycpgahd | YcpgZhd
Ycqgahd | YcqgZhd
Ycrgahd | YcrgZhd
Ydsgahd | YdsgZhd
Ydtgahd | YdtgZhd
Ydugahd | YdugZhd
Ydvgahd | YdvgZhd
Ydwgahd | YdwgZhd
Ydxgahd | YdxgZhd
Ydygahd | YdygZhd
Ydzgahd | YdzgZhd
Zadgahd | ZZdgZhd
Zbegahd | ZbegZhd
Zbfgahd | ZbfgZhd
Zbggahd | ZbggZhd
Zbhgahd | ZbhgZhd
Zbigahd | ZbigZhd
Zcjgahd | ZcjgZhd
Zckgahd | ZckgZhd
Zclgahd | ZclgZhd
Zcmgahd | ZcmgZhd
Zcngahd | ZcngZhd
Zcogahd | ZcogZhd
Zcpgahd | ZcpgZhd
Zcqgahd | ZcqgZhd
Zcrgahd | ZcrgZhd
Zdsgahd | ZdsgZhd
Zdtgahd | ZdtgZhd
Zdugahd | ZdugZhd
Zdvgahd | ZdvgZhd
Zdwgahd | ZdwgZhd
Zdxgahd | ZdxgZhd
Zdygahd | ZdygZhd
Zdzgahd | ZdzgZhd
(644 rows)
-- replaces 'a' with 'Z' globally. The matching is case-insensitive.
-- flag 'g' is global replacement and flag 'i' is for matching
-- case-insensitive.
-- lname | regexp_replace
-----------+----------------
-- Aadgahd | ZZdgZhd
-- Abegahd | ZbegZhd
-- Abfgahd | ZbfgZhd
-- Abggahd | ZbggZhd
--...................
--...................
-- Zdwgahd | ZdwgZhd
-- Zdxgahd | ZdxgZhd
-- Zdygahd | ZdygZhd
-- Zdzgahd | ZdzgZhd
--(644 rows)
-- match 3rd occurance of 'a' (parenthesized subrexpression of the
-- pattern should be inserted.) and replace it with 'Z'
-- \& indicates that the substring matching the entire pattern
-- shouldbeisered.
--select DISTINCT lname, regexp_replace(lname, 'a(..)','\\3\\&Z','g')
--from phone_book_substr
--;
-- lname | regexp_replace
-----------+----------------
-- Aadgahd | AadgZahdZ
-- Abegahd | AbegahdZ
-- Abfgahd | AbfgahdZ
--...................
--...................
-- Zdwgahd | ZdwgahdZ
-- Zdxgahd | ZdxgahdZ
-- Zdygahd | ZdygahdZ
-- Zdzgahd | ZdzgahdZ
--(644 rows)
--select DISTINCT lname, regexp_replace(lname, 'yg','GY')
--from phone_book_substr
--where substring(lname from '%\\"yg\\"%' for '\\') IS NOT NULL
--;
-- lname | regexp_replace
-----------+----------------
-- Adygahd | AdGYahd
-- Bdygahd | BdGYahd
-- Cdygahd | CdGYahd
-- Ddygahd | DdGYahd
-- Edygahd | EdGYahd
--..................
--..................
-- Udygahd | UdGYahd
-- Vdygahd | VdGYahd
-- Wdygahd | WdGYahd
-- Xdygahd | XdGYahd
-- Ydygahd | YdGYahd
-- Zdygahd | ZdGYahd
--(28 rows)
--select DISTINCT lname, regexp_replace(lname, 'yg.h.','GY')
--from phone_book_substr
--where substring(lname from '%\\"yg_h\\"%' for '\\') IS NOT NULL
--;
-- lname | regexp_replace
-----------+----------------
-- Adygahd | AdGY
-- Bdygahd | BdGY
-- Cdygahd | CdGY
-- Ddygahd | DdGY
--........................
--........................
-- Wdygahd | WdGY
-- Xdygahd | XdGY
-- Ydygahd | YdGY
-- Zdygahd | ZdGY
--(28 rows)
-----------------------------------------------------------------------
SELECT regexp_matches('foobarbequebaz', '(bar)(beque)');
regexp_matches
----------------
{bar,beque}
(1 row)
-- regexp_matches
----------------
-- {bar,beque}
--(1 row)
SELECT regexp_matches('foobarbequebazilbarfbonk', '(b[^b]+)(b[^b]+)', 'g');
regexp_matches
----------------
{bar,beque}
{bazil,barf}
(2 rows)
-- regexp_matches
----------------
-- {bar,beque}
-- {bazil,barf}
--(2 rows)
SELECT regexp_matches('foobarbequebaz', 'barbeque');
regexp_matches
----------------
{barbeque}
(1 row)
-- regexp_matches
----------------
-- {barbeque}
--(1 row)
select regexp_matches('Aadgahd', '(ad)');
regexp_matches
----------------
{ad}
(1 row)
-- regexp_matches
----------------
-- {ad}
--(1 row)
select DISTINCT lname, regexp_matches(lname, 'yg')
from phone_book_substr order by lname;
lname | regexp_matches
---------+----------------
Adygahd | {yg}
Bdygahd | {yg}
Cdygahd | {yg}
Ddygahd | {yg}
Edygahd | {yg}
Fdygahd | {yg}
Gdygahd | {yg}
Hdygahd | {yg}
Idygahd | {yg}
Jdygahd | {yg}
Kdygahd | {yg}
Keygahd | {yg}
Ldygahd | {yg}
Liygahd | {yg}
Mdygahd | {yg}
Moygahd | {yg}
Ndygahd | {yg}
Nuygahd | {yg}
Odygahd | {yg}
Pdygahd | {yg}
Rdygahd | {yg}
Sdygahd | {yg}
Udygahd | {yg}
Vdygahd | {yg}
Wdygahd | {yg}
Xdygahd | {yg}
Ydygahd | {yg}
Zdygahd | {yg}
(28 rows)
-- lname | regexp_matches
-----------+----------------
-- Adygahd | {yg}
-- Bdygahd | {yg}
-- Cdygahd | {yg}
-- Ddygahd | {yg}
-- Edygahd | {yg}
-- ..............
-- ..............
-- Vdygahd | {yg}
-- Wdygahd | {yg}
-- Xdygahd | {yg}
-- Ydygahd | {yg}
-- Zdygahd | {yg}
--(28 rows)
select DISTINCT lname, regexp_matches(lname, 'z_y') from phone_book_substr ;
lname | regexp_matches
-------+----------------
(0 rows)
-- lname | regexp_matches
-------+----------------
--(0 rows)
select DISTINCT lname, regexp_matches(lname, 'z') from phone_book_substr order by lname;
lname | regexp_matches
---------+----------------
Adzgahd | {z}
Bdzgahd | {z}
Cdzgahd | {z}
Ddzgahd | {z}
Edzgahd | {z}
Fdzgahd | {z}
Gdzgahd | {z}
Hdzgahd | {z}
Idzgahd | {z}
Jdzgahd | {z}
Kdzgahd | {z}
Kezgahd | {z}
Ldzgahd | {z}
Lizgahd | {z}
Mdzgahd | {z}
Mozgahd | {z}
Ndzgahd | {z}
Nuzgahd | {z}
Odzgahd | {z}
Pdzgahd | {z}
Rdzgahd | {z}
Sdzgahd | {z}
Udzgahd | {z}
Vdzgahd | {z}
Wdzgahd | {z}
Xdzgahd | {z}
Ydzgahd | {z}
Zdzgahd | {z}
(28 rows)
-- lname | regexp_matches
---------+----------------
-- Adzgahd | {z}
-- Bdzgahd | {z}
-- Cdzgahd | {z}
-- Ddzgahd | {z}
--..............
--..............
-- Wdzgahd | {z}
-- Xdzgahd | {z}
-- Ydzgahd | {z}
-- Zdzgahd | {z}
--(28 rows)
select DISTINCT lname, regexp_matches(lname, 'Z') from phone_book_substr order by lname;
lname | regexp_matches
---------+----------------
Zadgahd | {Z}
Zbegahd | {Z}
Zbfgahd | {Z}
Zbggahd | {Z}
Zbhgahd | {Z}
Zbigahd | {Z}
Zcjgahd | {Z}
Zckgahd | {Z}
Zclgahd | {Z}
Zcmgahd | {Z}
Zcngahd | {Z}
Zcogahd | {Z}
Zcpgahd | {Z}
Zcqgahd | {Z}
Zcrgahd | {Z}
Zdsgahd | {Z}
Zdtgahd | {Z}
Zdugahd | {Z}
Zdvgahd | {Z}
Zdwgahd | {Z}
Zdxgahd | {Z}
Zdygahd | {Z}
Zdzgahd | {Z}
(23 rows)
-- lname | regexp_matches
-----------+----------------
-- Zadgahd | {Z}
-- Zbegahd | {Z}
-- Zbfgahd | {Z}
-- Zbggahd | {Z}
--..............
--..............
-- Zdxgahd | {Z}
-- Zdygahd | {Z}
-- Zdzgahd | {Z}
--(23 rows)
select DISTINCT lname, regexp_matches(lname, 'W') from phone_book_substr order by lname;
lname | regexp_matches
---------+----------------
Wadgahd | {W}
Wbegahd | {W}
Wbfgahd | {W}
Wbggahd | {W}
Wbhgahd | {W}
Wbigahd | {W}
Wcjgahd | {W}
Wckgahd | {W}
Wclgahd | {W}
Wcmgahd | {W}
Wcngahd | {W}
Wcogahd | {W}
Wcpgahd | {W}
Wcqgahd | {W}
Wcrgahd | {W}
Wdsgahd | {W}
Wdtgahd | {W}
Wdugahd | {W}
Wdvgahd | {W}
Wdwgahd | {W}
Wdxgahd | {W}
Wdygahd | {W}
Wdzgahd | {W}
(23 rows)
-- lname | regexp_matches
-----------+----------------
-- Wadgahd | {W}
-- Wbegahd | {W}
-- Wbfgahd | {W}
-- Wbggahd | {W}
--..............
--..............
-- Wdxgahd | {W}
-- Wdygahd | {W}
-- Wdzgahd | {W}
--(23 rows)
select DISTINCT lname, regexp_matches(lname, '^W') from phone_book_substr order by lname;
lname | regexp_matches
---------+----------------
Wadgahd | {W}
Wbegahd | {W}
Wbfgahd | {W}
Wbggahd | {W}
Wbhgahd | {W}
Wbigahd | {W}
Wcjgahd | {W}
Wckgahd | {W}
Wclgahd | {W}
Wcmgahd | {W}
Wcngahd | {W}
Wcogahd | {W}
Wcpgahd | {W}
Wcqgahd | {W}
Wcrgahd | {W}
Wdsgahd | {W}
Wdtgahd | {W}
Wdugahd | {W}
Wdvgahd | {W}
Wdwgahd | {W}
Wdxgahd | {W}
Wdygahd | {W}
Wdzgahd | {W}
(23 rows)
-- lname | regexp_matches
-----------+----------------
-- Wadgahd | {W}
-- Wbegahd | {W}
-- Wbfgahd | {W}
--.............
--..............
-- Wdxgahd | {W}
-- Wdygahd | {W}
-- Wdzgahd | {W}
--(23 rows)
select DISTINCT lname, regexp_matches(lname, '^W_x') from phone_book_substr ;
lname | regexp_matches
-------+----------------
(0 rows)
-- lname | regexp_matches
-------+----------------
--(0 rows)
select DISTINCT lname, regexp_matches(lname, '^W_x____') from phone_book_substr ;
lname | regexp_matches
-------+----------------
(0 rows)
-- lname | regexp_matches
-------+----------------
--(0 rows)
select DISTINCT lname, regexp_matches(lname, '^W_x*') from phone_book_substr ;
lname | regexp_matches
-------+----------------
(0 rows)
-- lname | regexp_matches
-------+----------------
--(0 rows)
select DISTINCT lname, regexp_matches(lname, '^W_x$d') from phone_book_substr ;
lname | regexp_matches
-------+----------------
(0 rows)
-- lname | regexp_matches
-------+----------------
--(0 rows)
select DISTINCT lname, regexp_matches(lname, '(dad)') from phone_book_substr ;
lname | regexp_matches
-------+----------------
(0 rows)
-- lname | regexp_matches
-------+----------------
--(0 rows)
--Changed to First Name from Last Name.
select DISTINCT fname, regexp_matches(fname, '(dad)') from phone_book_substr order by lname;
ERROR: for SELECT DISTINCT, ORDER BY expressions must appear in select list
LINE 1: ...tches(fname, '(dad)') from phone_book_substr order by lname;
^
-- fname | regexp_matches
---------+----------------
-- Aahdadj | {dad}
-- Abhdadj | {dad}
-- Achdadj | {dad}
-- Adhdadj | {dad}
--................
--................
-- Zuhdadj | {dad}
-- Zwhdadj | {dad}
-- Zxhdadj | {dad}
-- Zyhdadj | {dad}
--(377 rows)
select DISTINCT fname, regexp_matches(fname, '(uh)(ad)') from phone_book_substr ;
fname | regexp_matches
-------+----------------
(0 rows)
-- fname | regexp_matches
-------+----------------
--(0 rows)
select DISTINCT fname, regexp_matches(fname, '(uh)(dad)') from phone_book_substr order by fname;
fname | regexp_matches
---------+----------------
Auhdadj | {uh,dad}
Buhdadj | {uh,dad}
Duhdadj | {uh,dad}
Euhdadj | {uh,dad}
Guhdadj | {uh,dad}
Huhdadj | {uh,dad}
Iuhdadj | {uh,dad}
Juhdadj | {uh,dad}
Luhdadj | {uh,dad}
Muhdadj | {uh,dad}
Nuhdadj | {uh,dad}
Ouhdadj | {uh,dad}
Puhdadj | {uh,dad}
Ruhdadj | {uh,dad}
Tuhdadj | {uh,dad}
Vuhdadj | {uh,dad}
Xuhdadj | {uh,dad}
Yuhdadj | {uh,dad}
Zuhdadj | {uh,dad}
(19 rows)
-- fname | regexp_matches
-----------+----------------
-- Auhdadj | {uh,dad}
-- Buhdadj | {uh,dad}
-- Duhdadj | {uh,dad}
--...................
--...................
-- Xuhdadj | {uh,dad}
-- Yuhdadj | {uh,dad}
-- Zuhdadj | {uh,dad}
--(19 rows)
select DISTINCT fname, regexp_matches(fname, '(uhdad)') from phone_book_substr order by fname;
fname | regexp_matches
---------+----------------
Auhdadj | {uhdad}
Buhdadj | {uhdad}
Duhdadj | {uhdad}
Euhdadj | {uhdad}
Guhdadj | {uhdad}
Huhdadj | {uhdad}
Iuhdadj | {uhdad}
Juhdadj | {uhdad}
Luhdadj | {uhdad}
Muhdadj | {uhdad}
Nuhdadj | {uhdad}
Ouhdadj | {uhdad}
Puhdadj | {uhdad}
Ruhdadj | {uhdad}
Tuhdadj | {uhdad}
Vuhdadj | {uhdad}
Xuhdadj | {uhdad}
Yuhdadj | {uhdad}
Zuhdadj | {uhdad}
(19 rows)
-- fname | regexp_matches
-----------+----------------
-- Auhdadj | {uhdad}
-- Buhdadj | {uhdad}
-- Duhdadj | {uhdad}
--..................
--..................
-- Xuhdadj | {uhdad}
-- Yuhdadj | {uhdad}
-- Zuhdadj | {uhdad}
--(19 rows)
select DISTINCT fname, regexp_matches(fname, '(y)','i') from phone_book_substr order by fname;
fname | regexp_matches
---------+----------------
Ayhdadj | {y}
Byhdadj | {y}
Dyhdadj | {y}
Eyhdadj | {y}
Gyhdadj | {y}
Hyhdadj | {y}
Iyhdadj | {y}
Jyhdadj | {y}
Lyhdadj | {y}
Myhdadj | {y}
Nyhdadj | {y}
Oyhdadj | {y}
Pyhdadj | {y}
Ryhdadj | {y}
Tyhdadj | {y}
Vyhdadj | {y}
Xyhdadj | {y}
Yahdadj | {Y}
Ybhdadj | {Y}
Ychdadj | {Y}
Ydhdadj | {Y}
Yehdadj | {Y}
Yfhdadj | {Y}
Yghdadj | {Y}
Ykhdadj | {Y}
Ymhdadj | {Y}
Ynhdadj | {Y}
Ythdadj | {Y}
Yuhdadj | {Y}
Ywhdadj | {Y}
Yxhdadj | {Y}
Yyhdadj | {Y}
Zyhdadj | {y}
(33 rows)
-- fname | regexp_matches
-----------+----------------
-- Ayhdadj | {y}
-- Byhdadj | {y}
-- Dyhdadj | {y}
--..............
--..............
-- Vyhdadj | {y}
-- Xyhdadj | {y}
-- Yahdadj | {Y}
-- Ybhdadj | {Y}
-- Ychdadj | {Y}
-- Ydhdadj | {Y}
--..............
--..............
-- Yxhdadj | {Y}
-- Yyhdadj | {Y}
-- Zyhdadj | {y}
--(33 rows)
select DISTINCT fname, regexp_matches(fname, '(y|h)','i') from phone_book_substr order by fname;
fname | regexp_matches
---------+----------------
Aahdadj | {h}
Abhdadj | {h}
Achdadj | {h}
Adhdadj | {h}
Aehdadj | {h}
Afhdadj | {h}
Aghdadj | {h}
Akhdadj | {h}
Amhdadj | {h}
Anhdadj | {h}
Ashdadj | {h}
Athdadj | {h}
Auhdadj | {h}
Awhdadj | {h}
Axhdadj | {h}
Ayhdadj | {y}
Bahdadj | {h}
Bbhdadj | {h}
Bfhdadj | {h}
Bghdadj | {h}
Bihdadj | {h}
Bkhdadj | {h}
Bphdadj | {h}
Bshdadj | {h}
Bthdadj | {h}
Buhdadj | {h}
Bwhdadj | {h}
Bxhdadj | {h}
Byhdadj | {y}
Cahdadj | {h}
Cbhdadj | {h}
Cchdadj | {h}
Cdhdadj | {h}
Cehdadj | {h}
Cfhdadj | {h}
Cghdadj | {h}
Ckhdadj | {h}
Cmhdadj | {h}
Cnhdadj | {h}
Cxhdadj | {h}
Dahdadj | {h}
Dbhdadj | {h}
Dchdadj | {h}
Ddhdadj | {h}
Dehdadj | {h}
Dfhdadj | {h}
Dghdadj | {h}
Dihdadj | {h}
Dkhdadj | {h}
Dphdadj | {h}
Dshdadj | {h}
Dthdadj | {h}
Duhdadj | {h}
Dwhdadj | {h}
Dxhdadj | {h}
Dyhdadj | {y}
Eahdadj | {h}
Ebhdadj | {h}
Echdadj | {h}
Edhdadj | {h}
Eehdadj | {h}
Efhdadj | {h}
Eghdadj | {h}
Eihdadj | {h}
Ekhdadj | {h}
Emhdadj | {h}
Enhdadj | {h}
Ephdadj | {h}
Eshdadj | {h}
Ethdadj | {h}
Euhdadj | {h}
Ewhdadj | {h}
Exhdadj | {h}
Eyhdadj | {y}
Fahdadj | {h}
Fbhdadj | {h}
Fchdadj | {h}
Fdhdadj | {h}
Fehdadj | {h}
Ffhdadj | {h}
Fghdadj | {h}
Fihdadj | {h}
Fkhdadj | {h}
Fmhdadj | {h}
Fnhdadj | {h}
Fphdadj | {h}
Fxhdadj | {h}
Gahdadj | {h}
Gbhdadj | {h}
Gchdadj | {h}
Gdhdadj | {h}
Gfhdadj | {h}
Gghdadj | {h}
Gihdadj | {h}
Gkhdadj | {h}
Gmhdadj | {h}
Gnhdadj | {h}
Gphdadj | {h}
Gshdadj | {h}
Gthdadj | {h}
Guhdadj | {h}
Gwhdadj | {h}
Gxhdadj | {h}
Gyhdadj | {y}
Hahdadj | {H}
Hbhdadj | {H}
Hchdadj | {H}
Hdhdadj | {H}
Hehdadj | {H}
Hfhdadj | {H}
Hghdadj | {H}
Hihdadj | {H}
Hkhdadj | {H}
Hmhdadj | {H}
Hnhdadj | {H}
Hthdadj | {H}
Huhdadj | {H}
Hwhdadj | {H}
Hxhdadj | {H}
Hyhdadj | {H}
Iahdadj | {h}
Ibhdadj | {h}
Ichdadj | {h}
Idhdadj | {h}
Iehdadj | {h}
Ifhdadj | {h}
Ighdadj | {h}
Iihdadj | {h}
Ikhdadj | {h}
Imhdadj | {h}
Inhdadj | {h}
Iphdadj | {h}
Ishdadj | {h}
Ithdadj | {h}
Iuhdadj | {h}
Iwhdadj | {h}
Ixhdadj | {h}
Iyhdadj | {y}
Jahdadj | {h}
Jbhdadj | {h}
Jchdadj | {h}
Jdhdadj | {h}
Jehdadj | {h}
Jfhdadj | {h}
Jghdadj | {h}
Jihdadj | {h}
Jphdadj | {h}
Jshdadj | {h}
Jthdadj | {h}
Juhdadj | {h}
Jwhdadj | {h}
Jxhdadj | {h}
Jyhdadj | {y}
Kahdadj | {h}
Kbhdadj | {h}
Kchdadj | {h}
Kdhdadj | {h}
Kehdadj | {h}
Kfhdadj | {h}
Kghdadj | {h}
Kkhdadj | {h}
Kmhdadj | {h}
Knhdadj | {h}
Kxhdadj | {h}
Lahdadj | {h}
Lbhdadj | {h}
Lchdadj | {h}
Ldhdadj | {h}
Lehdadj | {h}
Lfhdadj | {h}
Lghdadj | {h}
Lihdadj | {h}
Lkhdadj | {h}
Lmhdadj | {h}
Lphdadj | {h}
Lshdadj | {h}
Lthdadj | {h}
Luhdadj | {h}
Lwhdadj | {h}
Lxhdadj | {h}
Lyhdadj | {y}
Mahdadj | {h}
Mbhdadj | {h}
Mchdadj | {h}
Mdhdadj | {h}
Mehdadj | {h}
Mfhdadj | {h}
Mghdadj | {h}
Mihdadj | {h}
Mkhdadj | {h}
Mmhdadj | {h}
Mnhdadj | {h}
Mshdadj | {h}
Mthdadj | {h}
Muhdadj | {h}
Mwhdadj | {h}
Mxhdadj | {h}
Myhdadj | {y}
Nahdadj | {h}
Nbhdadj | {h}
Nchdadj | {h}
Ndhdadj | {h}
Nehdadj | {h}
Nfhdadj | {h}
Nghdadj | {h}
Nihdadj | {h}
Nkhdadj | {h}
Nmhdadj | {h}
Nnhdadj | {h}
Nphdadj | {h}
Nshdadj | {h}
Nthdadj | {h}
Nuhdadj | {h}
Nwhdadj | {h}
Nxhdadj | {h}
Nyhdadj | {y}
Oahdadj | {h}
Obhdadj | {h}
Ochdadj | {h}
Odhdadj | {h}
Ofhdadj | {h}
Oghdadj | {h}
Oihdadj | {h}
Okhdadj | {h}
Omhdadj | {h}
Onhdadj | {h}
Ophdadj | {h}
Oshdadj | {h}
Othdadj | {h}
Ouhdadj | {h}
Owhdadj | {h}
Oxhdadj | {h}
Oyhdadj | {y}
Pahdadj | {h}
Pbhdadj | {h}
Pchdadj | {h}
Pdhdadj | {h}
Pehdadj | {h}
Pfhdadj | {h}
Pghdadj | {h}
Pihdadj | {h}
Pkhdadj | {h}
Pmhdadj | {h}
Pnhdadj | {h}
Pphdadj | {h}
Pshdadj | {h}
Pthdadj | {h}
Puhdadj | {h}
Pwhdadj | {h}
Pxhdadj | {h}
Pyhdadj | {y}
Qahdadj | {h}
Qbhdadj | {h}
Qchdadj | {h}
Qdhdadj | {h}
Qehdadj | {h}
Qfhdadj | {h}
Qghdadj | {h}
Qkhdadj | {h}
Qmhdadj | {h}
Qnhdadj | {h}
Qxhdadj | {h}
Rehdadj | {h}
Rfhdadj | {h}
Rghdadj | {h}
Rshdadj | {h}
Rthdadj | {h}
Ruhdadj | {h}
Rwhdadj | {h}
Rxhdadj | {h}
Ryhdadj | {y}
Sahdadj | {h}
Sbhdadj | {h}
Sdhdadj | {h}
Sghdadj | {h}
Sihdadj | {h}
Skhdadj | {h}
Smhdadj | {h}
Snhdadj | {h}
Sphdadj | {h}
Sshdadj | {h}
Sxhdadj | {h}
Tahdadj | {h}
Tbhdadj | {h}
Tchdadj | {h}
Tdhdadj | {h}
Tehdadj | {h}
Tfhdadj | {h}
Tghdadj | {h}
Tkhdadj | {h}
Tmhdadj | {h}
Tshdadj | {h}
Tthdadj | {h}
Tuhdadj | {h}
Twhdadj | {h}
Txhdadj | {h}
Tyhdadj | {y}
Uahdadj | {h}
Ubhdadj | {h}
Uchdadj | {h}
Udhdadj | {h}
Uehdadj | {h}
Ughdadj | {h}
Uihdadj | {h}
Ukhdadj | {h}
Umhdadj | {h}
Unhdadj | {h}
Uphdadj | {h}
Uxhdadj | {h}
Vehdadj | {h}
Vfhdadj | {h}
Vghdadj | {h}
Vihdadj | {h}
Vphdadj | {h}
Vshdadj | {h}
Vthdadj | {h}
Vuhdadj | {h}
Vwhdadj | {h}
Vxhdadj | {h}
Vyhdadj | {y}
Wahdadj | {h}
Wbhdadj | {h}
Wchdadj | {h}
Wdhdadj | {h}
Wehdadj | {h}
Wfhdadj | {h}
Wghdadj | {h}
Wihdadj | {h}
Wkhdadj | {h}
Wmhdadj | {h}
Wnhdadj | {h}
Wphdadj | {h}
Wshdadj | {h}
Wxhdadj | {h}
Xbhdadj | {h}
Xchdadj | {h}
Xdhdadj | {h}
Xehdadj | {h}
Xghdadj | {h}
Xihdadj | {h}
Xmhdadj | {h}
Xnhdadj | {h}
Xphdadj | {h}
Xshdadj | {h}
Xthdadj | {h}
Xuhdadj | {h}
Xwhdadj | {h}
Xxhdadj | {h}
Xyhdadj | {y}
Yahdadj | {Y}
Ybhdadj | {Y}
Ychdadj | {Y}
Ydhdadj | {Y}
Yehdadj | {Y}
Yfhdadj | {Y}
Yghdadj | {Y}
Ykhdadj | {Y}
Ymhdadj | {Y}
Ynhdadj | {Y}
Ythdadj | {Y}
Yuhdadj | {Y}
Ywhdadj | {Y}
Yxhdadj | {Y}
Yyhdadj | {Y}
Zahdadj | {h}
Zbhdadj | {h}
Zghdadj | {h}
Zihdadj | {h}
Zkhdadj | {h}
Zmhdadj | {h}
Zphdadj | {h}
Zshdadj | {h}
Zthdadj | {h}
Zuhdadj | {h}
Zwhdadj | {h}
Zxhdadj | {h}
Zyhdadj | {y}
(377 rows)
-- fname | regexp_matches
-----------+----------------
-- Aahdadj | {h}
-- Abhdadj | {h}
--..............
-- Bghdadj | {h}
-- Bihdadj | {h}
--..............
-- Yxhdadj | {Y}
-- Yyhdadj | {Y}
-- Zahdadj | {h}
--..............
-- Zxhdadj | {h}
-- Zyhdadj | {y}
--(377 rows)
--
--Exactly one match {1}
select DISTINCT fname, regexp_matches(fname, '(y|h){1}','i') from phone_book_substr order by fname;
fname | regexp_matches
---------+----------------
Aahdadj | {h}
Abhdadj | {h}
Achdadj | {h}
Adhdadj | {h}
Aehdadj | {h}
Afhdadj | {h}
Aghdadj | {h}
Akhdadj | {h}
Amhdadj | {h}
Anhdadj | {h}
Ashdadj | {h}
Athdadj | {h}
Auhdadj | {h}
Awhdadj | {h}
Axhdadj | {h}
Ayhdadj | {y}
Bahdadj | {h}
Bbhdadj | {h}
Bfhdadj | {h}
Bghdadj | {h}
Bihdadj | {h}
Bkhdadj | {h}
Bphdadj | {h}
Bshdadj | {h}
Bthdadj | {h}
Buhdadj | {h}
Bwhdadj | {h}
Bxhdadj | {h}
Byhdadj | {y}
Cahdadj | {h}
Cbhdadj | {h}
Cchdadj | {h}
Cdhdadj | {h}
Cehdadj | {h}
Cfhdadj | {h}
Cghdadj | {h}
Ckhdadj | {h}
Cmhdadj | {h}
Cnhdadj | {h}
Cxhdadj | {h}
Dahdadj | {h}
Dbhdadj | {h}
Dchdadj | {h}
Ddhdadj | {h}
Dehdadj | {h}
Dfhdadj | {h}
Dghdadj | {h}
Dihdadj | {h}
Dkhdadj | {h}
Dphdadj | {h}
Dshdadj | {h}
Dthdadj | {h}
Duhdadj | {h}
Dwhdadj | {h}
Dxhdadj | {h}
Dyhdadj | {y}
Eahdadj | {h}
Ebhdadj | {h}
Echdadj | {h}
Edhdadj | {h}
Eehdadj | {h}
Efhdadj | {h}
Eghdadj | {h}
Eihdadj | {h}
Ekhdadj | {h}
Emhdadj | {h}
Enhdadj | {h}
Ephdadj | {h}
Eshdadj | {h}
Ethdadj | {h}
Euhdadj | {h}
Ewhdadj | {h}
Exhdadj | {h}
Eyhdadj | {y}
Fahdadj | {h}
Fbhdadj | {h}
Fchdadj | {h}
Fdhdadj | {h}
Fehdadj | {h}
Ffhdadj | {h}
Fghdadj | {h}
Fihdadj | {h}
Fkhdadj | {h}
Fmhdadj | {h}
Fnhdadj | {h}
Fphdadj | {h}
Fxhdadj | {h}
Gahdadj | {h}
Gbhdadj | {h}
Gchdadj | {h}
Gdhdadj | {h}
Gfhdadj | {h}
Gghdadj | {h}
Gihdadj | {h}
Gkhdadj | {h}
Gmhdadj | {h}
Gnhdadj | {h}
Gphdadj | {h}
Gshdadj | {h}
Gthdadj | {h}
Guhdadj | {h}
Gwhdadj | {h}
Gxhdadj | {h}
Gyhdadj | {y}
Hahdadj | {H}
Hbhdadj | {H}
Hchdadj | {H}
Hdhdadj | {H}
Hehdadj | {H}
Hfhdadj | {H}
Hghdadj | {H}
Hihdadj | {H}
Hkhdadj | {H}
Hmhdadj | {H}
Hnhdadj | {H}
Hthdadj | {H}
Huhdadj | {H}
Hwhdadj | {H}
Hxhdadj | {H}
Hyhdadj | {H}
Iahdadj | {h}
Ibhdadj | {h}
Ichdadj | {h}
Idhdadj | {h}
Iehdadj | {h}
Ifhdadj | {h}
Ighdadj | {h}
Iihdadj | {h}
Ikhdadj | {h}
Imhdadj | {h}
Inhdadj | {h}
Iphdadj | {h}
Ishdadj | {h}
Ithdadj | {h}
Iuhdadj | {h}
Iwhdadj | {h}
Ixhdadj | {h}
Iyhdadj | {y}
Jahdadj | {h}
Jbhdadj | {h}
Jchdadj | {h}
Jdhdadj | {h}
Jehdadj | {h}
Jfhdadj | {h}
Jghdadj | {h}
Jihdadj | {h}
Jphdadj | {h}
Jshdadj | {h}
Jthdadj | {h}
Juhdadj | {h}
Jwhdadj | {h}
Jxhdadj | {h}
Jyhdadj | {y}
Kahdadj | {h}
Kbhdadj | {h}
Kchdadj | {h}
Kdhdadj | {h}
Kehdadj | {h}
Kfhdadj | {h}
Kghdadj | {h}
Kkhdadj | {h}
Kmhdadj | {h}
Knhdadj | {h}
Kxhdadj | {h}
Lahdadj | {h}
Lbhdadj | {h}
Lchdadj | {h}
Ldhdadj | {h}
Lehdadj | {h}
Lfhdadj | {h}
Lghdadj | {h}
Lihdadj | {h}
Lkhdadj | {h}
Lmhdadj | {h}
Lphdadj | {h}
Lshdadj | {h}
Lthdadj | {h}
Luhdadj | {h}
Lwhdadj | {h}
Lxhdadj | {h}
Lyhdadj | {y}
Mahdadj | {h}
Mbhdadj | {h}
Mchdadj | {h}
Mdhdadj | {h}
Mehdadj | {h}
Mfhdadj | {h}
Mghdadj | {h}
Mihdadj | {h}
Mkhdadj | {h}
Mmhdadj | {h}
Mnhdadj | {h}
Mshdadj | {h}
Mthdadj | {h}
Muhdadj | {h}
Mwhdadj | {h}
Mxhdadj | {h}
Myhdadj | {y}
Nahdadj | {h}
Nbhdadj | {h}
Nchdadj | {h}
Ndhdadj | {h}
Nehdadj | {h}
Nfhdadj | {h}
Nghdadj | {h}
Nihdadj | {h}
Nkhdadj | {h}
Nmhdadj | {h}
Nnhdadj | {h}
Nphdadj | {h}
Nshdadj | {h}
Nthdadj | {h}
Nuhdadj | {h}
Nwhdadj | {h}
Nxhdadj | {h}
Nyhdadj | {y}
Oahdadj | {h}
Obhdadj | {h}
Ochdadj | {h}
Odhdadj | {h}
Ofhdadj | {h}
Oghdadj | {h}
Oihdadj | {h}
Okhdadj | {h}
Omhdadj | {h}
Onhdadj | {h}
Ophdadj | {h}
Oshdadj | {h}
Othdadj | {h}
Ouhdadj | {h}
Owhdadj | {h}
Oxhdadj | {h}
Oyhdadj | {y}
Pahdadj | {h}
Pbhdadj | {h}
Pchdadj | {h}
Pdhdadj | {h}
Pehdadj | {h}
Pfhdadj | {h}
Pghdadj | {h}
Pihdadj | {h}
Pkhdadj | {h}
Pmhdadj | {h}
Pnhdadj | {h}
Pphdadj | {h}
Pshdadj | {h}
Pthdadj | {h}
Puhdadj | {h}
Pwhdadj | {h}
Pxhdadj | {h}
Pyhdadj | {y}
Qahdadj | {h}
Qbhdadj | {h}
Qchdadj | {h}
Qdhdadj | {h}
Qehdadj | {h}
Qfhdadj | {h}
Qghdadj | {h}
Qkhdadj | {h}
Qmhdadj | {h}
Qnhdadj | {h}
Qxhdadj | {h}
Rehdadj | {h}
Rfhdadj | {h}
Rghdadj | {h}
Rshdadj | {h}
Rthdadj | {h}
Ruhdadj | {h}
Rwhdadj | {h}
Rxhdadj | {h}
Ryhdadj | {y}
Sahdadj | {h}
Sbhdadj | {h}
Sdhdadj | {h}
Sghdadj | {h}
Sihdadj | {h}
Skhdadj | {h}
Smhdadj | {h}
Snhdadj | {h}
Sphdadj | {h}
Sshdadj | {h}
Sxhdadj | {h}
Tahdadj | {h}
Tbhdadj | {h}
Tchdadj | {h}
Tdhdadj | {h}
Tehdadj | {h}
Tfhdadj | {h}
Tghdadj | {h}
Tkhdadj | {h}
Tmhdadj | {h}
Tshdadj | {h}
Tthdadj | {h}
Tuhdadj | {h}
Twhdadj | {h}
Txhdadj | {h}
Tyhdadj | {y}
Uahdadj | {h}
Ubhdadj | {h}
Uchdadj | {h}
Udhdadj | {h}
Uehdadj | {h}
Ughdadj | {h}
Uihdadj | {h}
Ukhdadj | {h}
Umhdadj | {h}
Unhdadj | {h}
Uphdadj | {h}
Uxhdadj | {h}
Vehdadj | {h}
Vfhdadj | {h}
Vghdadj | {h}
Vihdadj | {h}
Vphdadj | {h}
Vshdadj | {h}
Vthdadj | {h}
Vuhdadj | {h}
Vwhdadj | {h}
Vxhdadj | {h}
Vyhdadj | {y}
Wahdadj | {h}
Wbhdadj | {h}
Wchdadj | {h}
Wdhdadj | {h}
Wehdadj | {h}
Wfhdadj | {h}
Wghdadj | {h}
Wihdadj | {h}
Wkhdadj | {h}
Wmhdadj | {h}
Wnhdadj | {h}
Wphdadj | {h}
Wshdadj | {h}
Wxhdadj | {h}
Xbhdadj | {h}
Xchdadj | {h}
Xdhdadj | {h}
Xehdadj | {h}
Xghdadj | {h}
Xihdadj | {h}
Xmhdadj | {h}
Xnhdadj | {h}
Xphdadj | {h}
Xshdadj | {h}
Xthdadj | {h}
Xuhdadj | {h}
Xwhdadj | {h}
Xxhdadj | {h}
Xyhdadj | {y}
Yahdadj | {Y}
Ybhdadj | {Y}
Ychdadj | {Y}
Ydhdadj | {Y}
Yehdadj | {Y}
Yfhdadj | {Y}
Yghdadj | {Y}
Ykhdadj | {Y}
Ymhdadj | {Y}
Ynhdadj | {Y}
Ythdadj | {Y}
Yuhdadj | {Y}
Ywhdadj | {Y}
Yxhdadj | {Y}
Yyhdadj | {Y}
Zahdadj | {h}
Zbhdadj | {h}
Zghdadj | {h}
Zihdadj | {h}
Zkhdadj | {h}
Zmhdadj | {h}
Zphdadj | {h}
Zshdadj | {h}
Zthdadj | {h}
Zuhdadj | {h}
Zwhdadj | {h}
Zxhdadj | {h}
Zyhdadj | {y}
(377 rows)
-- fname | regexp_matches
-----------+----------------
-- Aahdadj | {h}
-- Abhdadj | {h}
-- Achdadj | {h}
-- Adhdadj | {h}
--..............
-- Vyhdadj | {y}
-- Wahdadj | {h}
--..............
-- Xwhdadj | {h}
-- Xxhdadj | {h}
-- Xyhdadj | {y}
-- Yahdadj | {Y}
--..............
-- Yxhdadj | {Y}
-- Yyhdadj | {Y}
-- Zahdadj | {h}
--..............
-- Zwhdadj | {h}
-- Zxhdadj | {h}
-- Zyhdadj | {y}
--(377 rows)
select DISTINCT fname, regexp_matches(fname, '(W){2}','i') from phone_book_substr ;
fname | regexp_matches
-------+----------------
(0 rows)
-- fname | regexp_matches
-------+----------------
--(0 rows)
--Exactly two consecutive matches {2}.
--Is this right?
select DISTINCT fname, regexp_matches(fname, '(d){2}','i') from phone_book_substr ;
fname | regexp_matches
---------+----------------
Ddhdadj | {d}
(1 row)
-- fname | regexp_matches
---------+----------------
-- Ddhdadj | {d}
--(1 row)
--One or more but not more than two.
--Is this right?
select DISTINCT fname, regexp_matches(fname, '(d){1,2}','i') from phone_book_substr order by fname;
fname | regexp_matches
---------+----------------
Aahdadj | {d}
Abhdadj | {d}
Achdadj | {d}
Adhdadj | {d}
Aehdadj | {d}
Afhdadj | {d}
Aghdadj | {d}
Akhdadj | {d}
Amhdadj | {d}
Anhdadj | {d}
Ashdadj | {d}
Athdadj | {d}
Auhdadj | {d}
Awhdadj | {d}
Axhdadj | {d}
Ayhdadj | {d}
Bahdadj | {d}
Bbhdadj | {d}
Bfhdadj | {d}
Bghdadj | {d}
Bihdadj | {d}
Bkhdadj | {d}
Bphdadj | {d}
Bshdadj | {d}
Bthdadj | {d}
Buhdadj | {d}
Bwhdadj | {d}
Bxhdadj | {d}
Byhdadj | {d}
Cahdadj | {d}
Cbhdadj | {d}
Cchdadj | {d}
Cdhdadj | {d}
Cehdadj | {d}
Cfhdadj | {d}
Cghdadj | {d}
Ckhdadj | {d}
Cmhdadj | {d}
Cnhdadj | {d}
Cxhdadj | {d}
Dahdadj | {D}
Dbhdadj | {D}
Dchdadj | {D}
Ddhdadj | {d}
Dehdadj | {D}
Dfhdadj | {D}
Dghdadj | {D}
Dihdadj | {D}
Dkhdadj | {D}
Dphdadj | {D}
Dshdadj | {D}
Dthdadj | {D}
Duhdadj | {D}
Dwhdadj | {D}
Dxhdadj | {D}
Dyhdadj | {D}
Eahdadj | {d}
Ebhdadj | {d}
Echdadj | {d}
Edhdadj | {d}
Eehdadj | {d}
Efhdadj | {d}
Eghdadj | {d}
Eihdadj | {d}
Ekhdadj | {d}
Emhdadj | {d}
Enhdadj | {d}
Ephdadj | {d}
Eshdadj | {d}
Ethdadj | {d}
Euhdadj | {d}
Ewhdadj | {d}
Exhdadj | {d}
Eyhdadj | {d}
Fahdadj | {d}
Fbhdadj | {d}
Fchdadj | {d}
Fdhdadj | {d}
Fehdadj | {d}
Ffhdadj | {d}
Fghdadj | {d}
Fihdadj | {d}
Fkhdadj | {d}
Fmhdadj | {d}
Fnhdadj | {d}
Fphdadj | {d}
Fxhdadj | {d}
Gahdadj | {d}
Gbhdadj | {d}
Gchdadj | {d}
Gdhdadj | {d}
Gfhdadj | {d}
Gghdadj | {d}
Gihdadj | {d}
Gkhdadj | {d}
Gmhdadj | {d}
Gnhdadj | {d}
Gphdadj | {d}
Gshdadj | {d}
Gthdadj | {d}
Guhdadj | {d}
Gwhdadj | {d}
Gxhdadj | {d}
Gyhdadj | {d}
Hahdadj | {d}
Hbhdadj | {d}
Hchdadj | {d}
Hdhdadj | {d}
Hehdadj | {d}
Hfhdadj | {d}
Hghdadj | {d}
Hihdadj | {d}
Hkhdadj | {d}
Hmhdadj | {d}
Hnhdadj | {d}
Hthdadj | {d}
Huhdadj | {d}
Hwhdadj | {d}
Hxhdadj | {d}
Hyhdadj | {d}
Iahdadj | {d}
Ibhdadj | {d}
Ichdadj | {d}
Idhdadj | {d}
Iehdadj | {d}
Ifhdadj | {d}
Ighdadj | {d}
Iihdadj | {d}
Ikhdadj | {d}
Imhdadj | {d}
Inhdadj | {d}
Iphdadj | {d}
Ishdadj | {d}
Ithdadj | {d}
Iuhdadj | {d}
Iwhdadj | {d}
Ixhdadj | {d}
Iyhdadj | {d}
Jahdadj | {d}
Jbhdadj | {d}
Jchdadj | {d}
Jdhdadj | {d}
Jehdadj | {d}
Jfhdadj | {d}
Jghdadj | {d}
Jihdadj | {d}
Jphdadj | {d}
Jshdadj | {d}
Jthdadj | {d}
Juhdadj | {d}
Jwhdadj | {d}
Jxhdadj | {d}
Jyhdadj | {d}
Kahdadj | {d}
Kbhdadj | {d}
Kchdadj | {d}
Kdhdadj | {d}
Kehdadj | {d}
Kfhdadj | {d}
Kghdadj | {d}
Kkhdadj | {d}
Kmhdadj | {d}
Knhdadj | {d}
Kxhdadj | {d}
Lahdadj | {d}
Lbhdadj | {d}
Lchdadj | {d}
Ldhdadj | {d}
Lehdadj | {d}
Lfhdadj | {d}
Lghdadj | {d}
Lihdadj | {d}
Lkhdadj | {d}
Lmhdadj | {d}
Lphdadj | {d}
Lshdadj | {d}
Lthdadj | {d}
Luhdadj | {d}
Lwhdadj | {d}
Lxhdadj | {d}
Lyhdadj | {d}
Mahdadj | {d}
Mbhdadj | {d}
Mchdadj | {d}
Mdhdadj | {d}
Mehdadj | {d}
Mfhdadj | {d}
Mghdadj | {d}
Mihdadj | {d}
Mkhdadj | {d}
Mmhdadj | {d}
Mnhdadj | {d}
Mshdadj | {d}
Mthdadj | {d}
Muhdadj | {d}
Mwhdadj | {d}
Mxhdadj | {d}
Myhdadj | {d}
Nahdadj | {d}
Nbhdadj | {d}
Nchdadj | {d}
Ndhdadj | {d}
Nehdadj | {d}
Nfhdadj | {d}
Nghdadj | {d}
Nihdadj | {d}
Nkhdadj | {d}
Nmhdadj | {d}
Nnhdadj | {d}
Nphdadj | {d}
Nshdadj | {d}
Nthdadj | {d}
Nuhdadj | {d}
Nwhdadj | {d}
Nxhdadj | {d}
Nyhdadj | {d}
Oahdadj | {d}
Obhdadj | {d}
Ochdadj | {d}
Odhdadj | {d}
Ofhdadj | {d}
Oghdadj | {d}
Oihdadj | {d}
Okhdadj | {d}
Omhdadj | {d}
Onhdadj | {d}
Ophdadj | {d}
Oshdadj | {d}
Othdadj | {d}
Ouhdadj | {d}
Owhdadj | {d}
Oxhdadj | {d}
Oyhdadj | {d}
Pahdadj | {d}
Pbhdadj | {d}
Pchdadj | {d}
Pdhdadj | {d}
Pehdadj | {d}
Pfhdadj | {d}
Pghdadj | {d}
Pihdadj | {d}
Pkhdadj | {d}
Pmhdadj | {d}
Pnhdadj | {d}
Pphdadj | {d}
Pshdadj | {d}
Pthdadj | {d}
Puhdadj | {d}
Pwhdadj | {d}
Pxhdadj | {d}
Pyhdadj | {d}
Qahdadj | {d}
Qbhdadj | {d}
Qchdadj | {d}
Qdhdadj | {d}
Qehdadj | {d}
Qfhdadj | {d}
Qghdadj | {d}
Qkhdadj | {d}
Qmhdadj | {d}
Qnhdadj | {d}
Qxhdadj | {d}
Rehdadj | {d}
Rfhdadj | {d}
Rghdadj | {d}
Rshdadj | {d}
Rthdadj | {d}
Ruhdadj | {d}
Rwhdadj | {d}
Rxhdadj | {d}
Ryhdadj | {d}
Sahdadj | {d}
Sbhdadj | {d}
Sdhdadj | {d}
Sghdadj | {d}
Sihdadj | {d}
Skhdadj | {d}
Smhdadj | {d}
Snhdadj | {d}
Sphdadj | {d}
Sshdadj | {d}
Sxhdadj | {d}
Tahdadj | {d}
Tbhdadj | {d}
Tchdadj | {d}
Tdhdadj | {d}
Tehdadj | {d}
Tfhdadj | {d}
Tghdadj | {d}
Tkhdadj | {d}
Tmhdadj | {d}
Tshdadj | {d}
Tthdadj | {d}
Tuhdadj | {d}
Twhdadj | {d}
Txhdadj | {d}
Tyhdadj | {d}
Uahdadj | {d}
Ubhdadj | {d}
Uchdadj | {d}
Udhdadj | {d}
Uehdadj | {d}
Ughdadj | {d}
Uihdadj | {d}
Ukhdadj | {d}
Umhdadj | {d}
Unhdadj | {d}
Uphdadj | {d}
Uxhdadj | {d}
Vehdadj | {d}
Vfhdadj | {d}
Vghdadj | {d}
Vihdadj | {d}
Vphdadj | {d}
Vshdadj | {d}
Vthdadj | {d}
Vuhdadj | {d}
Vwhdadj | {d}
Vxhdadj | {d}
Vyhdadj | {d}
Wahdadj | {d}
Wbhdadj | {d}
Wchdadj | {d}
Wdhdadj | {d}
Wehdadj | {d}
Wfhdadj | {d}
Wghdadj | {d}
Wihdadj | {d}
Wkhdadj | {d}
Wmhdadj | {d}
Wnhdadj | {d}
Wphdadj | {d}
Wshdadj | {d}
Wxhdadj | {d}
Xbhdadj | {d}
Xchdadj | {d}
Xdhdadj | {d}
Xehdadj | {d}
Xghdadj | {d}
Xihdadj | {d}
Xmhdadj | {d}
Xnhdadj | {d}
Xphdadj | {d}
Xshdadj | {d}
Xthdadj | {d}
Xuhdadj | {d}
Xwhdadj | {d}
Xxhdadj | {d}
Xyhdadj | {d}
Yahdadj | {d}
Ybhdadj | {d}
Ychdadj | {d}
Ydhdadj | {d}
Yehdadj | {d}
Yfhdadj | {d}
Yghdadj | {d}
Ykhdadj | {d}
Ymhdadj | {d}
Ynhdadj | {d}
Ythdadj | {d}
Yuhdadj | {d}
Ywhdadj | {d}
Yxhdadj | {d}
Yyhdadj | {d}
Zahdadj | {d}
Zbhdadj | {d}
Zghdadj | {d}
Zihdadj | {d}
Zkhdadj | {d}
Zmhdadj | {d}
Zphdadj | {d}
Zshdadj | {d}
Zthdadj | {d}
Zuhdadj | {d}
Zwhdadj | {d}
Zxhdadj | {d}
Zyhdadj | {d}
(377 rows)
-- fname | regexp_matches
---------+----------------
-- Aahdadj | {d}
-- Abhdadj | {d}
-- Achdadj | {d}
--..............
-- Dahdadj | {D}
-- Dbhdadj | {D}
-- Dchdadj | {D}
-- Ddhdadj | {d}
-- Dehdadj | {D}
-- Dfhdadj | {D}
--..............
-- Zwhdadj | {d}
-- Zxhdadj | {d}
-- Zyhdadj | {d}
--(424 rows)
--
--Two or more matches {2,}
select DISTINCT lname, regexp_matches(lname, '(d){2,}','i') from phone_book_substr order by lname;
lname | regexp_matches
---------+----------------
Ddsgahd | {d}
Ddtgahd | {d}
Ddugahd | {d}
Ddvgahd | {d}
Ddwgahd | {d}
Ddxgahd | {d}
Ddygahd | {d}
Ddzgahd | {d}
(8 rows)
-- lname | regexp_matches
-----------+----------------
-- Ddsgahd | {d}
-- Ddtgahd | {d}
-- Ddugahd | {d}
-- Ddvgahd | {d}
-- Ddwgahd | {d}
-- Ddxgahd | {d}
-- Ddygahd | {d}
-- Ddzgahd | {d}
--(8 rows)
--
--3 or more matches.
--Is this right?
select DISTINCT lname, regexp_matches(lname, '(d){3,}','i') from phone_book_substr ;
lname | regexp_matches
-------+----------------
(0 rows)
-- lname | regexp_matches
-------+----------------
--(0 rows)
--Exactly 3 matches
select DISTINCT lname, regexp_matches(lname, '(d){3}','i') from phone_book_substr ;
lname | regexp_matches
-------+----------------
(0 rows)
-- lname | regexp_matches
-------+----------------
--(0 rows)
--Two or more but not more than 3 matches.
select DISTINCT lname, regexp_matches(lname, '(d){2,3}','i') from phone_book_substr order by lname;
lname | regexp_matches
---------+----------------
Ddsgahd | {d}
Ddtgahd | {d}
Ddugahd | {d}
Ddvgahd | {d}
Ddwgahd | {d}
Ddxgahd | {d}
Ddygahd | {d}
Ddzgahd | {d}
(8 rows)
-- lname | regexp_matches
---------+----------------
-- Ddsgahd | {d}
-- Ddtgahd | {d}
-- Ddugahd | {d}
-- Ddvgahd | {d}
-- Ddwgahd | {d}
-- Ddxgahd | {d}
-- Ddygahd | {d}
-- Ddzgahd | {d}
--(8 rows)
--
--One or more but not more than 2 matches.
--Is this right?
select DISTINCT lname, regexp_matches(lname, '(d){1,2}','i') from phone_book_substr order by lname;
lname | regexp_matches
---------+----------------
Aadgahd | {d}
Abegahd | {d}
Abfgahd | {d}
Abggahd | {d}
Abhgahd | {d}
Abigahd | {d}
Acjgahd | {d}
Ackgahd | {d}
Aclgahd | {d}
Acmgahd | {d}
Acngahd | {d}
Acogahd | {d}
Acpgahd | {d}
Acqgahd | {d}
Acrgahd | {d}
Adsgahd | {d}
Adtgahd | {d}
Adugahd | {d}
Advgahd | {d}
Adwgahd | {d}
Adxgahd | {d}
Adygahd | {d}
Adzgahd | {d}
Badgahd | {d}
Bbegahd | {d}
Bbfgahd | {d}
Bbggahd | {d}
Bbhgahd | {d}
Bbigahd | {d}
Bcjgahd | {d}
Bckgahd | {d}
Bclgahd | {d}
Bcmgahd | {d}
Bcngahd | {d}
Bcogahd | {d}
Bcpgahd | {d}
Bcqgahd | {d}
Bcrgahd | {d}
Bdsgahd | {d}
Bdtgahd | {d}
Bdugahd | {d}
Bdvgahd | {d}
Bdwgahd | {d}
Bdxgahd | {d}
Bdygahd | {d}
Bdzgahd | {d}
Cadgahd | {d}
Cbegahd | {d}
Cbfgahd | {d}
Cbggahd | {d}
Cbhgahd | {d}
Cbigahd | {d}
Ccjgahd | {d}
Cckgahd | {d}
Cclgahd | {d}
Ccmgahd | {d}
Ccngahd | {d}
Ccogahd | {d}
Ccpgahd | {d}
Ccqgahd | {d}
Ccrgahd | {d}
Cdsgahd | {d}
Cdtgahd | {d}
Cdugahd | {d}
Cdvgahd | {d}
Cdwgahd | {d}
Cdxgahd | {d}
Cdygahd | {d}
Cdzgahd | {d}
Dadgahd | {D}
Dbegahd | {D}
Dbfgahd | {D}
Dbggahd | {D}
Dbhgahd | {D}
Dbigahd | {D}
Dcjgahd | {D}
Dckgahd | {D}
Dclgahd | {D}
Dcmgahd | {D}
Dcngahd | {D}
Dcogahd | {D}
Dcpgahd | {D}
Dcqgahd | {D}
Dcrgahd | {D}
Ddsgahd | {d}
Ddtgahd | {d}
Ddugahd | {d}
Ddvgahd | {d}
Ddwgahd | {d}
Ddxgahd | {d}
Ddygahd | {d}
Ddzgahd | {d}
Eadgahd | {d}
Ebegahd | {d}
Ebfgahd | {d}
Ebggahd | {d}
Ebhgahd | {d}
Ebigahd | {d}
Ecjgahd | {d}
Eckgahd | {d}
Eclgahd | {d}
Ecmgahd | {d}
Ecngahd | {d}
Ecogahd | {d}
Ecpgahd | {d}
Ecqgahd | {d}
Ecrgahd | {d}
Edsgahd | {d}
Edtgahd | {d}
Edugahd | {d}
Edvgahd | {d}
Edwgahd | {d}
Edxgahd | {d}
Edygahd | {d}
Edzgahd | {d}
Fadgahd | {d}
Fbegahd | {d}
Fbfgahd | {d}
Fbggahd | {d}
Fbhgahd | {d}
Fbigahd | {d}
Fcjgahd | {d}
Fckgahd | {d}
Fclgahd | {d}
Fcmgahd | {d}
Fcngahd | {d}
Fcogahd | {d}
Fcpgahd | {d}
Fcqgahd | {d}
Fcrgahd | {d}
Fdsgahd | {d}
Fdtgahd | {d}
Fdugahd | {d}
Fdvgahd | {d}
Fdwgahd | {d}
Fdxgahd | {d}
Fdygahd | {d}
Fdzgahd | {d}
Gadgahd | {d}
Gbegahd | {d}
Gbfgahd | {d}
Gbggahd | {d}
Gbhgahd | {d}
Gbigahd | {d}
Gcjgahd | {d}
Gckgahd | {d}
Gclgahd | {d}
Gcmgahd | {d}
Gcngahd | {d}
Gcogahd | {d}
Gcpgahd | {d}
Gcqgahd | {d}
Gcrgahd | {d}
Gdsgahd | {d}
Gdtgahd | {d}
Gdugahd | {d}
Gdvgahd | {d}
Gdwgahd | {d}
Gdxgahd | {d}
Gdygahd | {d}
Gdzgahd | {d}
Hadgahd | {d}
Hbegahd | {d}
Hbfgahd | {d}
Hbggahd | {d}
Hbhgahd | {d}
Hbigahd | {d}
Hcjgahd | {d}
Hckgahd | {d}
Hclgahd | {d}
Hcmgahd | {d}
Hcngahd | {d}
Hcogahd | {d}
Hcpgahd | {d}
Hcqgahd | {d}
Hcrgahd | {d}
Hdsgahd | {d}
Hdtgahd | {d}
Hdugahd | {d}
Hdvgahd | {d}
Hdwgahd | {d}
Hdxgahd | {d}
Hdygahd | {d}
Hdzgahd | {d}
Iadgahd | {d}
Ibegahd | {d}
Ibfgahd | {d}
Ibggahd | {d}
Ibhgahd | {d}
Ibigahd | {d}
Icjgahd | {d}
Ickgahd | {d}
Iclgahd | {d}
Icmgahd | {d}
Icngahd | {d}
Icogahd | {d}
Icpgahd | {d}
Icqgahd | {d}
Icrgahd | {d}
Idsgahd | {d}
Idtgahd | {d}
Idugahd | {d}
Idvgahd | {d}
Idwgahd | {d}
Idxgahd | {d}
Idygahd | {d}
Idzgahd | {d}
Jadgahd | {d}
Jbegahd | {d}
Jbfgahd | {d}
Jbggahd | {d}
Jbhgahd | {d}
Jbigahd | {d}
Jcjgahd | {d}
Jckgahd | {d}
Jclgahd | {d}
Jcmgahd | {d}
Jcngahd | {d}
Jcogahd | {d}
Jcpgahd | {d}
Jcqgahd | {d}
Jcrgahd | {d}
Jdsgahd | {d}
Jdtgahd | {d}
Jdugahd | {d}
Jdvgahd | {d}
Jdwgahd | {d}
Jdxgahd | {d}
Jdygahd | {d}
Jdzgahd | {d}
Kadgahd | {d}
Kbegahd | {d}
Kbfgahd | {d}
Kbggahd | {d}
Kbhgahd | {d}
Kbigahd | {d}
Kcjgahd | {d}
Kckgahd | {d}
Kclgahd | {d}
Kcmgahd | {d}
Kcngahd | {d}
Kcogahd | {d}
Kcpgahd | {d}
Kcqgahd | {d}
Kcrgahd | {d}
Kdsgahd | {d}
Kdtgahd | {d}
Kdugahd | {d}
Kdvgahd | {d}
Kdwgahd | {d}
Kdxgahd | {d}
Kdygahd | {d}
Kdzgahd | {d}
Kedgahd | {d}
Keegahd | {d}
Kefgahd | {d}
Keggahd | {d}
Kehgahd | {d}
Keigahd | {d}
Kejgahd | {d}
Kekgahd | {d}
Kelgahd | {d}
Kemgahd | {d}
Kengahd | {d}
Keogahd | {d}
Kepgahd | {d}
Keqgahd | {d}
Kergahd | {d}
Kesgahd | {d}
Ketgahd | {d}
Keugahd | {d}
Kevgahd | {d}
Kewgahd | {d}
Kexgahd | {d}
Keygahd | {d}
Kezgahd | {d}
Ladgahd | {d}
Lbegahd | {d}
Lbfgahd | {d}
Lbggahd | {d}
Lbhgahd | {d}
Lbigahd | {d}
Lcjgahd | {d}
Lckgahd | {d}
Lclgahd | {d}
Lcmgahd | {d}
Lcngahd | {d}
Lcogahd | {d}
Lcpgahd | {d}
Lcqgahd | {d}
Lcrgahd | {d}
Ldsgahd | {d}
Ldtgahd | {d}
Ldugahd | {d}
Ldvgahd | {d}
Ldwgahd | {d}
Ldxgahd | {d}
Ldygahd | {d}
Ldzgahd | {d}
Lidgahd | {d}
Liegahd | {d}
Lifgahd | {d}
Liggahd | {d}
Lihgahd | {d}
Liigahd | {d}
Lijgahd | {d}
Likgahd | {d}
Lilgahd | {d}
Limgahd | {d}
Lingahd | {d}
Liogahd | {d}
Lipgahd | {d}
Liqgahd | {d}
Lirgahd | {d}
Lisgahd | {d}
Litgahd | {d}
Liugahd | {d}
Livgahd | {d}
Liwgahd | {d}
Lixgahd | {d}
Liygahd | {d}
Lizgahd | {d}
Madgahd | {d}
Mbegahd | {d}
Mbfgahd | {d}
Mbggahd | {d}
Mbhgahd | {d}
Mbigahd | {d}
Mcjgahd | {d}
Mckgahd | {d}
Mclgahd | {d}
Mcmgahd | {d}
Mcngahd | {d}
Mcogahd | {d}
Mcpgahd | {d}
Mcqgahd | {d}
Mcrgahd | {d}
Mdsgahd | {d}
Mdtgahd | {d}
Mdugahd | {d}
Mdvgahd | {d}
Mdwgahd | {d}
Mdxgahd | {d}
Mdygahd | {d}
Mdzgahd | {d}
Modgahd | {d}
Moegahd | {d}
Mofgahd | {d}
Moggahd | {d}
Mohgahd | {d}
Moigahd | {d}
Mojgahd | {d}
Mokgahd | {d}
Molgahd | {d}
Momgahd | {d}
Mongahd | {d}
Moogahd | {d}
Mopgahd | {d}
Moqgahd | {d}
Morgahd | {d}
Mosgahd | {d}
Motgahd | {d}
Mougahd | {d}
Movgahd | {d}
Mowgahd | {d}
Moxgahd | {d}
Moygahd | {d}
Mozgahd | {d}
Nadgahd | {d}
Nbegahd | {d}
Nbfgahd | {d}
Nbggahd | {d}
Nbhgahd | {d}
Nbigahd | {d}
Ncjgahd | {d}
Nckgahd | {d}
Nclgahd | {d}
Ncmgahd | {d}
Ncngahd | {d}
Ncogahd | {d}
Ncpgahd | {d}
Ncqgahd | {d}
Ncrgahd | {d}
Ndsgahd | {d}
Ndtgahd | {d}
Ndugahd | {d}
Ndvgahd | {d}
Ndwgahd | {d}
Ndxgahd | {d}
Ndygahd | {d}
Ndzgahd | {d}
Nudgahd | {d}
Nuegahd | {d}
Nufgahd | {d}
Nuggahd | {d}
Nuhgahd | {d}
Nuigahd | {d}
Nujgahd | {d}
Nukgahd | {d}
Nulgahd | {d}
Numgahd | {d}
Nungahd | {d}
Nuogahd | {d}
Nupgahd | {d}
Nuqgahd | {d}
Nurgahd | {d}
Nusgahd | {d}
Nutgahd | {d}
Nuugahd | {d}
Nuvgahd | {d}
Nuwgahd | {d}
Nuxgahd | {d}
Nuygahd | {d}
Nuzgahd | {d}
Oadgahd | {d}
Obegahd | {d}
Obfgahd | {d}
Obggahd | {d}
Obhgahd | {d}
Obigahd | {d}
Ocjgahd | {d}
Ockgahd | {d}
Oclgahd | {d}
Ocmgahd | {d}
Ocngahd | {d}
Ocogahd | {d}
Ocpgahd | {d}
Ocqgahd | {d}
Ocrgahd | {d}
Odsgahd | {d}
Odtgahd | {d}
Odugahd | {d}
Odvgahd | {d}
Odwgahd | {d}
Odxgahd | {d}
Odygahd | {d}
Odzgahd | {d}
Padgahd | {d}
Pbegahd | {d}
Pbfgahd | {d}
Pbggahd | {d}
Pbhgahd | {d}
Pbigahd | {d}
Pcjgahd | {d}
Pckgahd | {d}
Pclgahd | {d}
Pcmgahd | {d}
Pcngahd | {d}
Pcogahd | {d}
Pcpgahd | {d}
Pcqgahd | {d}
Pcrgahd | {d}
Pdsgahd | {d}
Pdtgahd | {d}
Pdugahd | {d}
Pdvgahd | {d}
Pdwgahd | {d}
Pdxgahd | {d}
Pdygahd | {d}
Pdzgahd | {d}
Radgahd | {d}
Rbegahd | {d}
Rbfgahd | {d}
Rbggahd | {d}
Rbhgahd | {d}
Rbigahd | {d}
Rcjgahd | {d}
Rckgahd | {d}
Rclgahd | {d}
Rcmgahd | {d}
Rcngahd | {d}
Rcogahd | {d}
Rcpgahd | {d}
Rcqgahd | {d}
Rcrgahd | {d}
Rdsgahd | {d}
Rdtgahd | {d}
Rdugahd | {d}
Rdvgahd | {d}
Rdwgahd | {d}
Rdxgahd | {d}
Rdygahd | {d}
Rdzgahd | {d}
Sadgahd | {d}
Sbegahd | {d}
Sbfgahd | {d}
Sbggahd | {d}
Sbhgahd | {d}
Sbigahd | {d}
Scjgahd | {d}
Sckgahd | {d}
Sclgahd | {d}
Scmgahd | {d}
Scngahd | {d}
Scogahd | {d}
Scpgahd | {d}
Scqgahd | {d}
Scrgahd | {d}
Sdsgahd | {d}
Sdtgahd | {d}
Sdugahd | {d}
Sdvgahd | {d}
Sdwgahd | {d}
Sdxgahd | {d}
Sdygahd | {d}
Sdzgahd | {d}
Uadgahd | {d}
Ubegahd | {d}
Ubfgahd | {d}
Ubggahd | {d}
Ubhgahd | {d}
Ubigahd | {d}
Ucjgahd | {d}
Uckgahd | {d}
Uclgahd | {d}
Ucmgahd | {d}
Ucngahd | {d}
Ucogahd | {d}
Ucpgahd | {d}
Ucqgahd | {d}
Ucrgahd | {d}
Udsgahd | {d}
Udtgahd | {d}
Udugahd | {d}
Udvgahd | {d}
Udwgahd | {d}
Udxgahd | {d}
Udygahd | {d}
Udzgahd | {d}
Vadgahd | {d}
Vbegahd | {d}
Vbfgahd | {d}
Vbggahd | {d}
Vbhgahd | {d}
Vbigahd | {d}
Vcjgahd | {d}
Vckgahd | {d}
Vclgahd | {d}
Vcmgahd | {d}
Vcngahd | {d}
Vcogahd | {d}
Vcpgahd | {d}
Vcqgahd | {d}
Vcrgahd | {d}
Vdsgahd | {d}
Vdtgahd | {d}
Vdugahd | {d}
Vdvgahd | {d}
Vdwgahd | {d}
Vdxgahd | {d}
Vdygahd | {d}
Vdzgahd | {d}
Wadgahd | {d}
Wbegahd | {d}
Wbfgahd | {d}
Wbggahd | {d}
Wbhgahd | {d}
Wbigahd | {d}
Wcjgahd | {d}
Wckgahd | {d}
Wclgahd | {d}
Wcmgahd | {d}
Wcngahd | {d}
Wcogahd | {d}
Wcpgahd | {d}
Wcqgahd | {d}
Wcrgahd | {d}
Wdsgahd | {d}
Wdtgahd | {d}
Wdugahd | {d}
Wdvgahd | {d}
Wdwgahd | {d}
Wdxgahd | {d}
Wdygahd | {d}
Wdzgahd | {d}
Xadgahd | {d}
Xbegahd | {d}
Xbfgahd | {d}
Xbggahd | {d}
Xbhgahd | {d}
Xbigahd | {d}
Xcjgahd | {d}
Xckgahd | {d}
Xclgahd | {d}
Xcmgahd | {d}
Xcngahd | {d}
Xcogahd | {d}
Xcpgahd | {d}
Xcqgahd | {d}
Xcrgahd | {d}
Xdsgahd | {d}
Xdtgahd | {d}
Xdugahd | {d}
Xdvgahd | {d}
Xdwgahd | {d}
Xdxgahd | {d}
Xdygahd | {d}
Xdzgahd | {d}
Yadgahd | {d}
Ybegahd | {d}
Ybfgahd | {d}
Ybggahd | {d}
Ybhgahd | {d}
Ybigahd | {d}
Ycjgahd | {d}
Yckgahd | {d}
Yclgahd | {d}
Ycmgahd | {d}
Ycngahd | {d}
Ycogahd | {d}
Ycpgahd | {d}
Ycqgahd | {d}
Ycrgahd | {d}
Ydsgahd | {d}
Ydtgahd | {d}
Ydugahd | {d}
Ydvgahd | {d}
Ydwgahd | {d}
Ydxgahd | {d}
Ydygahd | {d}
Ydzgahd | {d}
Zadgahd | {d}
Zbegahd | {d}
Zbfgahd | {d}
Zbggahd | {d}
Zbhgahd | {d}
Zbigahd | {d}
Zcjgahd | {d}
Zckgahd | {d}
Zclgahd | {d}
Zcmgahd | {d}
Zcngahd | {d}
Zcogahd | {d}
Zcpgahd | {d}
Zcqgahd | {d}
Zcrgahd | {d}
Zdsgahd | {d}
Zdtgahd | {d}
Zdugahd | {d}
Zdvgahd | {d}
Zdwgahd | {d}
Zdxgahd | {d}
Zdygahd | {d}
Zdzgahd | {d}
(644 rows)
-- lname | regexp_matches
-----------+----------------
-- Aadgahd | {d}
-- Abegahd | {d}
-- Abfgahd | {d}
--..............
-- Ddvgahd | {d}
-- Ddwgahd | {d}
-- Ddxgahd | {d}
--..............
-- Zdxgahd | {d}
-- Zdygahd | {d}
-- Zdzgahd | {d}
--(644 rows)
select DISTINCT lname, regexp_matches(lname, '(d.d)','i') from phone_book_substr ;
lname | regexp_matches
---------+----------------
Dadgahd | {Dad}
(1 row)
-- lname | regexp_matches
---------+----------------
-- Dadgahd | {Dad}
--(1 row)
select DISTINCT lname, regexp_matches(lname, '(g.h)', 'i') from phone_book_substr order by lname;
lname | regexp_matches
---------+----------------
Aadgahd | {gah}
Abegahd | {gah}
Abfgahd | {gah}
Abggahd | {gah}
Abhgahd | {gah}
Abigahd | {gah}
Acjgahd | {gah}
Ackgahd | {gah}
Aclgahd | {gah}
Acmgahd | {gah}
Acngahd | {gah}
Acogahd | {gah}
Acpgahd | {gah}
Acqgahd | {gah}
Acrgahd | {gah}
Adsgahd | {gah}
Adtgahd | {gah}
Adugahd | {gah}
Advgahd | {gah}
Adwgahd | {gah}
Adxgahd | {gah}
Adygahd | {gah}
Adzgahd | {gah}
Badgahd | {gah}
Bbegahd | {gah}
Bbfgahd | {gah}
Bbggahd | {gah}
Bbhgahd | {gah}
Bbigahd | {gah}
Bcjgahd | {gah}
Bckgahd | {gah}
Bclgahd | {gah}
Bcmgahd | {gah}
Bcngahd | {gah}
Bcogahd | {gah}
Bcpgahd | {gah}
Bcqgahd | {gah}
Bcrgahd | {gah}
Bdsgahd | {gah}
Bdtgahd | {gah}
Bdugahd | {gah}
Bdvgahd | {gah}
Bdwgahd | {gah}
Bdxgahd | {gah}
Bdygahd | {gah}
Bdzgahd | {gah}
Cadgahd | {gah}
Cbegahd | {gah}
Cbfgahd | {gah}
Cbggahd | {gah}
Cbhgahd | {gah}
Cbigahd | {gah}
Ccjgahd | {gah}
Cckgahd | {gah}
Cclgahd | {gah}
Ccmgahd | {gah}
Ccngahd | {gah}
Ccogahd | {gah}
Ccpgahd | {gah}
Ccqgahd | {gah}
Ccrgahd | {gah}
Cdsgahd | {gah}
Cdtgahd | {gah}
Cdugahd | {gah}
Cdvgahd | {gah}
Cdwgahd | {gah}
Cdxgahd | {gah}
Cdygahd | {gah}
Cdzgahd | {gah}
Dadgahd | {gah}
Dbegahd | {gah}
Dbfgahd | {gah}
Dbggahd | {gah}
Dbhgahd | {gah}
Dbigahd | {gah}
Dcjgahd | {gah}
Dckgahd | {gah}
Dclgahd | {gah}
Dcmgahd | {gah}
Dcngahd | {gah}
Dcogahd | {gah}
Dcpgahd | {gah}
Dcqgahd | {gah}
Dcrgahd | {gah}
Ddsgahd | {gah}
Ddtgahd | {gah}
Ddugahd | {gah}
Ddvgahd | {gah}
Ddwgahd | {gah}
Ddxgahd | {gah}
Ddygahd | {gah}
Ddzgahd | {gah}
Eadgahd | {gah}
Ebegahd | {gah}
Ebfgahd | {gah}
Ebggahd | {gah}
Ebhgahd | {gah}
Ebigahd | {gah}
Ecjgahd | {gah}
Eckgahd | {gah}
Eclgahd | {gah}
Ecmgahd | {gah}
Ecngahd | {gah}
Ecogahd | {gah}
Ecpgahd | {gah}
Ecqgahd | {gah}
Ecrgahd | {gah}
Edsgahd | {gah}
Edtgahd | {gah}
Edugahd | {gah}
Edvgahd | {gah}
Edwgahd | {gah}
Edxgahd | {gah}
Edygahd | {gah}
Edzgahd | {gah}
Fadgahd | {gah}
Fbegahd | {gah}
Fbfgahd | {gah}
Fbggahd | {gah}
Fbhgahd | {gah}
Fbigahd | {gah}
Fcjgahd | {gah}
Fckgahd | {gah}
Fclgahd | {gah}
Fcmgahd | {gah}
Fcngahd | {gah}
Fcogahd | {gah}
Fcpgahd | {gah}
Fcqgahd | {gah}
Fcrgahd | {gah}
Fdsgahd | {gah}
Fdtgahd | {gah}
Fdugahd | {gah}
Fdvgahd | {gah}
Fdwgahd | {gah}
Fdxgahd | {gah}
Fdygahd | {gah}
Fdzgahd | {gah}
Gadgahd | {gah}
Gbegahd | {gah}
Gbfgahd | {gah}
Gbggahd | {gah}
Gbhgahd | {Gbh}
Gbigahd | {gah}
Gcjgahd | {gah}
Gckgahd | {gah}
Gclgahd | {gah}
Gcmgahd | {gah}
Gcngahd | {gah}
Gcogahd | {gah}
Gcpgahd | {gah}
Gcqgahd | {gah}
Gcrgahd | {gah}
Gdsgahd | {gah}
Gdtgahd | {gah}
Gdugahd | {gah}
Gdvgahd | {gah}
Gdwgahd | {gah}
Gdxgahd | {gah}
Gdygahd | {gah}
Gdzgahd | {gah}
Hadgahd | {gah}
Hbegahd | {gah}
Hbfgahd | {gah}
Hbggahd | {gah}
Hbhgahd | {gah}
Hbigahd | {gah}
Hcjgahd | {gah}
Hckgahd | {gah}
Hclgahd | {gah}
Hcmgahd | {gah}
Hcngahd | {gah}
Hcogahd | {gah}
Hcpgahd | {gah}
Hcqgahd | {gah}
Hcrgahd | {gah}
Hdsgahd | {gah}
Hdtgahd | {gah}
Hdugahd | {gah}
Hdvgahd | {gah}
Hdwgahd | {gah}
Hdxgahd | {gah}
Hdygahd | {gah}
Hdzgahd | {gah}
Iadgahd | {gah}
Ibegahd | {gah}
Ibfgahd | {gah}
Ibggahd | {gah}
Ibhgahd | {gah}
Ibigahd | {gah}
Icjgahd | {gah}
Ickgahd | {gah}
Iclgahd | {gah}
Icmgahd | {gah}
Icngahd | {gah}
Icogahd | {gah}
Icpgahd | {gah}
Icqgahd | {gah}
Icrgahd | {gah}
Idsgahd | {gah}
Idtgahd | {gah}
Idugahd | {gah}
Idvgahd | {gah}
Idwgahd | {gah}
Idxgahd | {gah}
Idygahd | {gah}
Idzgahd | {gah}
Jadgahd | {gah}
Jbegahd | {gah}
Jbfgahd | {gah}
Jbggahd | {gah}
Jbhgahd | {gah}
Jbigahd | {gah}
Jcjgahd | {gah}
Jckgahd | {gah}
Jclgahd | {gah}
Jcmgahd | {gah}
Jcngahd | {gah}
Jcogahd | {gah}
Jcpgahd | {gah}
Jcqgahd | {gah}
Jcrgahd | {gah}
Jdsgahd | {gah}
Jdtgahd | {gah}
Jdugahd | {gah}
Jdvgahd | {gah}
Jdwgahd | {gah}
Jdxgahd | {gah}
Jdygahd | {gah}
Jdzgahd | {gah}
Kadgahd | {gah}
Kbegahd | {gah}
Kbfgahd | {gah}
Kbggahd | {gah}
Kbhgahd | {gah}
Kbigahd | {gah}
Kcjgahd | {gah}
Kckgahd | {gah}
Kclgahd | {gah}
Kcmgahd | {gah}
Kcngahd | {gah}
Kcogahd | {gah}
Kcpgahd | {gah}
Kcqgahd | {gah}
Kcrgahd | {gah}
Kdsgahd | {gah}
Kdtgahd | {gah}
Kdugahd | {gah}
Kdvgahd | {gah}
Kdwgahd | {gah}
Kdxgahd | {gah}
Kdygahd | {gah}
Kdzgahd | {gah}
Kedgahd | {gah}
Keegahd | {gah}
Kefgahd | {gah}
Keggahd | {gah}
Kehgahd | {gah}
Keigahd | {gah}
Kejgahd | {gah}
Kekgahd | {gah}
Kelgahd | {gah}
Kemgahd | {gah}
Kengahd | {gah}
Keogahd | {gah}
Kepgahd | {gah}
Keqgahd | {gah}
Kergahd | {gah}
Kesgahd | {gah}
Ketgahd | {gah}
Keugahd | {gah}
Kevgahd | {gah}
Kewgahd | {gah}
Kexgahd | {gah}
Keygahd | {gah}
Kezgahd | {gah}
Ladgahd | {gah}
Lbegahd | {gah}
Lbfgahd | {gah}
Lbggahd | {gah}
Lbhgahd | {gah}
Lbigahd | {gah}
Lcjgahd | {gah}
Lckgahd | {gah}
Lclgahd | {gah}
Lcmgahd | {gah}
Lcngahd | {gah}
Lcogahd | {gah}
Lcpgahd | {gah}
Lcqgahd | {gah}
Lcrgahd | {gah}
Ldsgahd | {gah}
Ldtgahd | {gah}
Ldugahd | {gah}
Ldvgahd | {gah}
Ldwgahd | {gah}
Ldxgahd | {gah}
Ldygahd | {gah}
Ldzgahd | {gah}
Lidgahd | {gah}
Liegahd | {gah}
Lifgahd | {gah}
Liggahd | {gah}
Lihgahd | {gah}
Liigahd | {gah}
Lijgahd | {gah}
Likgahd | {gah}
Lilgahd | {gah}
Limgahd | {gah}
Lingahd | {gah}
Liogahd | {gah}
Lipgahd | {gah}
Liqgahd | {gah}
Lirgahd | {gah}
Lisgahd | {gah}
Litgahd | {gah}
Liugahd | {gah}
Livgahd | {gah}
Liwgahd | {gah}
Lixgahd | {gah}
Liygahd | {gah}
Lizgahd | {gah}
Madgahd | {gah}
Mbegahd | {gah}
Mbfgahd | {gah}
Mbggahd | {gah}
Mbhgahd | {gah}
Mbigahd | {gah}
Mcjgahd | {gah}
Mckgahd | {gah}
Mclgahd | {gah}
Mcmgahd | {gah}
Mcngahd | {gah}
Mcogahd | {gah}
Mcpgahd | {gah}
Mcqgahd | {gah}
Mcrgahd | {gah}
Mdsgahd | {gah}
Mdtgahd | {gah}
Mdugahd | {gah}
Mdvgahd | {gah}
Mdwgahd | {gah}
Mdxgahd | {gah}
Mdygahd | {gah}
Mdzgahd | {gah}
Modgahd | {gah}
Moegahd | {gah}
Mofgahd | {gah}
Moggahd | {gah}
Mohgahd | {gah}
Moigahd | {gah}
Mojgahd | {gah}
Mokgahd | {gah}
Molgahd | {gah}
Momgahd | {gah}
Mongahd | {gah}
Moogahd | {gah}
Mopgahd | {gah}
Moqgahd | {gah}
Morgahd | {gah}
Mosgahd | {gah}
Motgahd | {gah}
Mougahd | {gah}
Movgahd | {gah}
Mowgahd | {gah}
Moxgahd | {gah}
Moygahd | {gah}
Mozgahd | {gah}
Nadgahd | {gah}
Nbegahd | {gah}
Nbfgahd | {gah}
Nbggahd | {gah}
Nbhgahd | {gah}
Nbigahd | {gah}
Ncjgahd | {gah}
Nckgahd | {gah}
Nclgahd | {gah}
Ncmgahd | {gah}
Ncngahd | {gah}
Ncogahd | {gah}
Ncpgahd | {gah}
Ncqgahd | {gah}
Ncrgahd | {gah}
Ndsgahd | {gah}
Ndtgahd | {gah}
Ndugahd | {gah}
Ndvgahd | {gah}
Ndwgahd | {gah}
Ndxgahd | {gah}
Ndygahd | {gah}
Ndzgahd | {gah}
Nudgahd | {gah}
Nuegahd | {gah}
Nufgahd | {gah}
Nuggahd | {gah}
Nuhgahd | {gah}
Nuigahd | {gah}
Nujgahd | {gah}
Nukgahd | {gah}
Nulgahd | {gah}
Numgahd | {gah}
Nungahd | {gah}
Nuogahd | {gah}
Nupgahd | {gah}
Nuqgahd | {gah}
Nurgahd | {gah}
Nusgahd | {gah}
Nutgahd | {gah}
Nuugahd | {gah}
Nuvgahd | {gah}
Nuwgahd | {gah}
Nuxgahd | {gah}
Nuygahd | {gah}
Nuzgahd | {gah}
Oadgahd | {gah}
Obegahd | {gah}
Obfgahd | {gah}
Obggahd | {gah}
Obhgahd | {gah}
Obigahd | {gah}
Ocjgahd | {gah}
Ockgahd | {gah}
Oclgahd | {gah}
Ocmgahd | {gah}
Ocngahd | {gah}
Ocogahd | {gah}
Ocpgahd | {gah}
Ocqgahd | {gah}
Ocrgahd | {gah}
Odsgahd | {gah}
Odtgahd | {gah}
Odugahd | {gah}
Odvgahd | {gah}
Odwgahd | {gah}
Odxgahd | {gah}
Odygahd | {gah}
Odzgahd | {gah}
Padgahd | {gah}
Pbegahd | {gah}
Pbfgahd | {gah}
Pbggahd | {gah}
Pbhgahd | {gah}
Pbigahd | {gah}
Pcjgahd | {gah}
Pckgahd | {gah}
Pclgahd | {gah}
Pcmgahd | {gah}
Pcngahd | {gah}
Pcogahd | {gah}
Pcpgahd | {gah}
Pcqgahd | {gah}
Pcrgahd | {gah}
Pdsgahd | {gah}
Pdtgahd | {gah}
Pdugahd | {gah}
Pdvgahd | {gah}
Pdwgahd | {gah}
Pdxgahd | {gah}
Pdygahd | {gah}
Pdzgahd | {gah}
Radgahd | {gah}
Rbegahd | {gah}
Rbfgahd | {gah}
Rbggahd | {gah}
Rbhgahd | {gah}
Rbigahd | {gah}
Rcjgahd | {gah}
Rckgahd | {gah}
Rclgahd | {gah}
Rcmgahd | {gah}
Rcngahd | {gah}
Rcogahd | {gah}
Rcpgahd | {gah}
Rcqgahd | {gah}
Rcrgahd | {gah}
Rdsgahd | {gah}
Rdtgahd | {gah}
Rdugahd | {gah}
Rdvgahd | {gah}
Rdwgahd | {gah}
Rdxgahd | {gah}
Rdygahd | {gah}
Rdzgahd | {gah}
Sadgahd | {gah}
Sbegahd | {gah}
Sbfgahd | {gah}
Sbggahd | {gah}
Sbhgahd | {gah}
Sbigahd | {gah}
Scjgahd | {gah}
Sckgahd | {gah}
Sclgahd | {gah}
Scmgahd | {gah}
Scngahd | {gah}
Scogahd | {gah}
Scpgahd | {gah}
Scqgahd | {gah}
Scrgahd | {gah}
Sdsgahd | {gah}
Sdtgahd | {gah}
Sdugahd | {gah}
Sdvgahd | {gah}
Sdwgahd | {gah}
Sdxgahd | {gah}
Sdygahd | {gah}
Sdzgahd | {gah}
Uadgahd | {gah}
Ubegahd | {gah}
Ubfgahd | {gah}
Ubggahd | {gah}
Ubhgahd | {gah}
Ubigahd | {gah}
Ucjgahd | {gah}
Uckgahd | {gah}
Uclgahd | {gah}
Ucmgahd | {gah}
Ucngahd | {gah}
Ucogahd | {gah}
Ucpgahd | {gah}
Ucqgahd | {gah}
Ucrgahd | {gah}
Udsgahd | {gah}
Udtgahd | {gah}
Udugahd | {gah}
Udvgahd | {gah}
Udwgahd | {gah}
Udxgahd | {gah}
Udygahd | {gah}
Udzgahd | {gah}
Vadgahd | {gah}
Vbegahd | {gah}
Vbfgahd | {gah}
Vbggahd | {gah}
Vbhgahd | {gah}
Vbigahd | {gah}
Vcjgahd | {gah}
Vckgahd | {gah}
Vclgahd | {gah}
Vcmgahd | {gah}
Vcngahd | {gah}
Vcogahd | {gah}
Vcpgahd | {gah}
Vcqgahd | {gah}
Vcrgahd | {gah}
Vdsgahd | {gah}
Vdtgahd | {gah}
Vdugahd | {gah}
Vdvgahd | {gah}
Vdwgahd | {gah}
Vdxgahd | {gah}
Vdygahd | {gah}
Vdzgahd | {gah}
Wadgahd | {gah}
Wbegahd | {gah}
Wbfgahd | {gah}
Wbggahd | {gah}
Wbhgahd | {gah}
Wbigahd | {gah}
Wcjgahd | {gah}
Wckgahd | {gah}
Wclgahd | {gah}
Wcmgahd | {gah}
Wcngahd | {gah}
Wcogahd | {gah}
Wcpgahd | {gah}
Wcqgahd | {gah}
Wcrgahd | {gah}
Wdsgahd | {gah}
Wdtgahd | {gah}
Wdugahd | {gah}
Wdvgahd | {gah}
Wdwgahd | {gah}
Wdxgahd | {gah}
Wdygahd | {gah}
Wdzgahd | {gah}
Xadgahd | {gah}
Xbegahd | {gah}
Xbfgahd | {gah}
Xbggahd | {gah}
Xbhgahd | {gah}
Xbigahd | {gah}
Xcjgahd | {gah}
Xckgahd | {gah}
Xclgahd | {gah}
Xcmgahd | {gah}
Xcngahd | {gah}
Xcogahd | {gah}
Xcpgahd | {gah}
Xcqgahd | {gah}
Xcrgahd | {gah}
Xdsgahd | {gah}
Xdtgahd | {gah}
Xdugahd | {gah}
Xdvgahd | {gah}
Xdwgahd | {gah}
Xdxgahd | {gah}
Xdygahd | {gah}
Xdzgahd | {gah}
Yadgahd | {gah}
Ybegahd | {gah}
Ybfgahd | {gah}
Ybggahd | {gah}
Ybhgahd | {gah}
Ybigahd | {gah}
Ycjgahd | {gah}
Yckgahd | {gah}
Yclgahd | {gah}
Ycmgahd | {gah}
Ycngahd | {gah}
Ycogahd | {gah}
Ycpgahd | {gah}
Ycqgahd | {gah}
Ycrgahd | {gah}
Ydsgahd | {gah}
Ydtgahd | {gah}
Ydugahd | {gah}
Ydvgahd | {gah}
Ydwgahd | {gah}
Ydxgahd | {gah}
Ydygahd | {gah}
Ydzgahd | {gah}
Zadgahd | {gah}
Zbegahd | {gah}
Zbfgahd | {gah}
Zbggahd | {gah}
Zbhgahd | {gah}
Zbigahd | {gah}
Zcjgahd | {gah}
Zckgahd | {gah}
Zclgahd | {gah}
Zcmgahd | {gah}
Zcngahd | {gah}
Zcogahd | {gah}
Zcpgahd | {gah}
Zcqgahd | {gah}
Zcrgahd | {gah}
Zdsgahd | {gah}
Zdtgahd | {gah}
Zdugahd | {gah}
Zdvgahd | {gah}
Zdwgahd | {gah}
Zdxgahd | {gah}
Zdygahd | {gah}
Zdzgahd | {gah}
(644 rows)
-- lname | regexp_matches
-----------+----------------
-- Aadgahd | {gah}
-- Abegahd | {gah}
-- Abfgahd | {gah}
--................
-- Zdxgahd | {gah}
-- Zdygahd | {gah}
-- Zdzgahd | {gah}
--(644 rows)
select DISTINCT lname, regexp_matches(lname, '[zh]', 'i') from phone_book_substr order by lname;
lname | regexp_matches
---------+----------------
Aadgahd | {h}
Abegahd | {h}
Abfgahd | {h}
Abggahd | {h}
Abhgahd | {h}
Abigahd | {h}
Acjgahd | {h}
Ackgahd | {h}
Aclgahd | {h}
Acmgahd | {h}
Acngahd | {h}
Acogahd | {h}
Acpgahd | {h}
Acqgahd | {h}
Acrgahd | {h}
Adsgahd | {h}
Adtgahd | {h}
Adugahd | {h}
Advgahd | {h}
Adwgahd | {h}
Adxgahd | {h}
Adygahd | {h}
Adzgahd | {z}
Badgahd | {h}
Bbegahd | {h}
Bbfgahd | {h}
Bbggahd | {h}
Bbhgahd | {h}
Bbigahd | {h}
Bcjgahd | {h}
Bckgahd | {h}
Bclgahd | {h}
Bcmgahd | {h}
Bcngahd | {h}
Bcogahd | {h}
Bcpgahd | {h}
Bcqgahd | {h}
Bcrgahd | {h}
Bdsgahd | {h}
Bdtgahd | {h}
Bdugahd | {h}
Bdvgahd | {h}
Bdwgahd | {h}
Bdxgahd | {h}
Bdygahd | {h}
Bdzgahd | {z}
Cadgahd | {h}
Cbegahd | {h}
Cbfgahd | {h}
Cbggahd | {h}
Cbhgahd | {h}
Cbigahd | {h}
Ccjgahd | {h}
Cckgahd | {h}
Cclgahd | {h}
Ccmgahd | {h}
Ccngahd | {h}
Ccogahd | {h}
Ccpgahd | {h}
Ccqgahd | {h}
Ccrgahd | {h}
Cdsgahd | {h}
Cdtgahd | {h}
Cdugahd | {h}
Cdvgahd | {h}
Cdwgahd | {h}
Cdxgahd | {h}
Cdygahd | {h}
Cdzgahd | {z}
Dadgahd | {h}
Dbegahd | {h}
Dbfgahd | {h}
Dbggahd | {h}
Dbhgahd | {h}
Dbigahd | {h}
Dcjgahd | {h}
Dckgahd | {h}
Dclgahd | {h}
Dcmgahd | {h}
Dcngahd | {h}
Dcogahd | {h}
Dcpgahd | {h}
Dcqgahd | {h}
Dcrgahd | {h}
Ddsgahd | {h}
Ddtgahd | {h}
Ddugahd | {h}
Ddvgahd | {h}
Ddwgahd | {h}
Ddxgahd | {h}
Ddygahd | {h}
Ddzgahd | {z}
Eadgahd | {h}
Ebegahd | {h}
Ebfgahd | {h}
Ebggahd | {h}
Ebhgahd | {h}
Ebigahd | {h}
Ecjgahd | {h}
Eckgahd | {h}
Eclgahd | {h}
Ecmgahd | {h}
Ecngahd | {h}
Ecogahd | {h}
Ecpgahd | {h}
Ecqgahd | {h}
Ecrgahd | {h}
Edsgahd | {h}
Edtgahd | {h}
Edugahd | {h}
Edvgahd | {h}
Edwgahd | {h}
Edxgahd | {h}
Edygahd | {h}
Edzgahd | {z}
Fadgahd | {h}
Fbegahd | {h}
Fbfgahd | {h}
Fbggahd | {h}
Fbhgahd | {h}
Fbigahd | {h}
Fcjgahd | {h}
Fckgahd | {h}
Fclgahd | {h}
Fcmgahd | {h}
Fcngahd | {h}
Fcogahd | {h}
Fcpgahd | {h}
Fcqgahd | {h}
Fcrgahd | {h}
Fdsgahd | {h}
Fdtgahd | {h}
Fdugahd | {h}
Fdvgahd | {h}
Fdwgahd | {h}
Fdxgahd | {h}
Fdygahd | {h}
Fdzgahd | {z}
Gadgahd | {h}
Gbegahd | {h}
Gbfgahd | {h}
Gbggahd | {h}
Gbhgahd | {h}
Gbigahd | {h}
Gcjgahd | {h}
Gckgahd | {h}
Gclgahd | {h}
Gcmgahd | {h}
Gcngahd | {h}
Gcogahd | {h}
Gcpgahd | {h}
Gcqgahd | {h}
Gcrgahd | {h}
Gdsgahd | {h}
Gdtgahd | {h}
Gdugahd | {h}
Gdvgahd | {h}
Gdwgahd | {h}
Gdxgahd | {h}
Gdygahd | {h}
Gdzgahd | {z}
Hadgahd | {H}
Hbegahd | {H}
Hbfgahd | {H}
Hbggahd | {H}
Hbhgahd | {H}
Hbigahd | {H}
Hcjgahd | {H}
Hckgahd | {H}
Hclgahd | {H}
Hcmgahd | {H}
Hcngahd | {H}
Hcogahd | {H}
Hcpgahd | {H}
Hcqgahd | {H}
Hcrgahd | {H}
Hdsgahd | {H}
Hdtgahd | {H}
Hdugahd | {H}
Hdvgahd | {H}
Hdwgahd | {H}
Hdxgahd | {H}
Hdygahd | {H}
Hdzgahd | {H}
Iadgahd | {h}
Ibegahd | {h}
Ibfgahd | {h}
Ibggahd | {h}
Ibhgahd | {h}
Ibigahd | {h}
Icjgahd | {h}
Ickgahd | {h}
Iclgahd | {h}
Icmgahd | {h}
Icngahd | {h}
Icogahd | {h}
Icpgahd | {h}
Icqgahd | {h}
Icrgahd | {h}
Idsgahd | {h}
Idtgahd | {h}
Idugahd | {h}
Idvgahd | {h}
Idwgahd | {h}
Idxgahd | {h}
Idygahd | {h}
Idzgahd | {z}
Jadgahd | {h}
Jbegahd | {h}
Jbfgahd | {h}
Jbggahd | {h}
Jbhgahd | {h}
Jbigahd | {h}
Jcjgahd | {h}
Jckgahd | {h}
Jclgahd | {h}
Jcmgahd | {h}
Jcngahd | {h}
Jcogahd | {h}
Jcpgahd | {h}
Jcqgahd | {h}
Jcrgahd | {h}
Jdsgahd | {h}
Jdtgahd | {h}
Jdugahd | {h}
Jdvgahd | {h}
Jdwgahd | {h}
Jdxgahd | {h}
Jdygahd | {h}
Jdzgahd | {z}
Kadgahd | {h}
Kbegahd | {h}
Kbfgahd | {h}
Kbggahd | {h}
Kbhgahd | {h}
Kbigahd | {h}
Kcjgahd | {h}
Kckgahd | {h}
Kclgahd | {h}
Kcmgahd | {h}
Kcngahd | {h}
Kcogahd | {h}
Kcpgahd | {h}
Kcqgahd | {h}
Kcrgahd | {h}
Kdsgahd | {h}
Kdtgahd | {h}
Kdugahd | {h}
Kdvgahd | {h}
Kdwgahd | {h}
Kdxgahd | {h}
Kdygahd | {h}
Kdzgahd | {z}
Kedgahd | {h}
Keegahd | {h}
Kefgahd | {h}
Keggahd | {h}
Kehgahd | {h}
Keigahd | {h}
Kejgahd | {h}
Kekgahd | {h}
Kelgahd | {h}
Kemgahd | {h}
Kengahd | {h}
Keogahd | {h}
Kepgahd | {h}
Keqgahd | {h}
Kergahd | {h}
Kesgahd | {h}
Ketgahd | {h}
Keugahd | {h}
Kevgahd | {h}
Kewgahd | {h}
Kexgahd | {h}
Keygahd | {h}
Kezgahd | {z}
Ladgahd | {h}
Lbegahd | {h}
Lbfgahd | {h}
Lbggahd | {h}
Lbhgahd | {h}
Lbigahd | {h}
Lcjgahd | {h}
Lckgahd | {h}
Lclgahd | {h}
Lcmgahd | {h}
Lcngahd | {h}
Lcogahd | {h}
Lcpgahd | {h}
Lcqgahd | {h}
Lcrgahd | {h}
Ldsgahd | {h}
Ldtgahd | {h}
Ldugahd | {h}
Ldvgahd | {h}
Ldwgahd | {h}
Ldxgahd | {h}
Ldygahd | {h}
Ldzgahd | {z}
Lidgahd | {h}
Liegahd | {h}
Lifgahd | {h}
Liggahd | {h}
Lihgahd | {h}
Liigahd | {h}
Lijgahd | {h}
Likgahd | {h}
Lilgahd | {h}
Limgahd | {h}
Lingahd | {h}
Liogahd | {h}
Lipgahd | {h}
Liqgahd | {h}
Lirgahd | {h}
Lisgahd | {h}
Litgahd | {h}
Liugahd | {h}
Livgahd | {h}
Liwgahd | {h}
Lixgahd | {h}
Liygahd | {h}
Lizgahd | {z}
Madgahd | {h}
Mbegahd | {h}
Mbfgahd | {h}
Mbggahd | {h}
Mbhgahd | {h}
Mbigahd | {h}
Mcjgahd | {h}
Mckgahd | {h}
Mclgahd | {h}
Mcmgahd | {h}
Mcngahd | {h}
Mcogahd | {h}
Mcpgahd | {h}
Mcqgahd | {h}
Mcrgahd | {h}
Mdsgahd | {h}
Mdtgahd | {h}
Mdugahd | {h}
Mdvgahd | {h}
Mdwgahd | {h}
Mdxgahd | {h}
Mdygahd | {h}
Mdzgahd | {z}
Modgahd | {h}
Moegahd | {h}
Mofgahd | {h}
Moggahd | {h}
Mohgahd | {h}
Moigahd | {h}
Mojgahd | {h}
Mokgahd | {h}
Molgahd | {h}
Momgahd | {h}
Mongahd | {h}
Moogahd | {h}
Mopgahd | {h}
Moqgahd | {h}
Morgahd | {h}
Mosgahd | {h}
Motgahd | {h}
Mougahd | {h}
Movgahd | {h}
Mowgahd | {h}
Moxgahd | {h}
Moygahd | {h}
Mozgahd | {z}
Nadgahd | {h}
Nbegahd | {h}
Nbfgahd | {h}
Nbggahd | {h}
Nbhgahd | {h}
Nbigahd | {h}
Ncjgahd | {h}
Nckgahd | {h}
Nclgahd | {h}
Ncmgahd | {h}
Ncngahd | {h}
Ncogahd | {h}
Ncpgahd | {h}
Ncqgahd | {h}
Ncrgahd | {h}
Ndsgahd | {h}
Ndtgahd | {h}
Ndugahd | {h}
Ndvgahd | {h}
Ndwgahd | {h}
Ndxgahd | {h}
Ndygahd | {h}
Ndzgahd | {z}
Nudgahd | {h}
Nuegahd | {h}
Nufgahd | {h}
Nuggahd | {h}
Nuhgahd | {h}
Nuigahd | {h}
Nujgahd | {h}
Nukgahd | {h}
Nulgahd | {h}
Numgahd | {h}
Nungahd | {h}
Nuogahd | {h}
Nupgahd | {h}
Nuqgahd | {h}
Nurgahd | {h}
Nusgahd | {h}
Nutgahd | {h}
Nuugahd | {h}
Nuvgahd | {h}
Nuwgahd | {h}
Nuxgahd | {h}
Nuygahd | {h}
Nuzgahd | {z}
Oadgahd | {h}
Obegahd | {h}
Obfgahd | {h}
Obggahd | {h}
Obhgahd | {h}
Obigahd | {h}
Ocjgahd | {h}
Ockgahd | {h}
Oclgahd | {h}
Ocmgahd | {h}
Ocngahd | {h}
Ocogahd | {h}
Ocpgahd | {h}
Ocqgahd | {h}
Ocrgahd | {h}
Odsgahd | {h}
Odtgahd | {h}
Odugahd | {h}
Odvgahd | {h}
Odwgahd | {h}
Odxgahd | {h}
Odygahd | {h}
Odzgahd | {z}
Padgahd | {h}
Pbegahd | {h}
Pbfgahd | {h}
Pbggahd | {h}
Pbhgahd | {h}
Pbigahd | {h}
Pcjgahd | {h}
Pckgahd | {h}
Pclgahd | {h}
Pcmgahd | {h}
Pcngahd | {h}
Pcogahd | {h}
Pcpgahd | {h}
Pcqgahd | {h}
Pcrgahd | {h}
Pdsgahd | {h}
Pdtgahd | {h}
Pdugahd | {h}
Pdvgahd | {h}
Pdwgahd | {h}
Pdxgahd | {h}
Pdygahd | {h}
Pdzgahd | {z}
Radgahd | {h}
Rbegahd | {h}
Rbfgahd | {h}
Rbggahd | {h}
Rbhgahd | {h}
Rbigahd | {h}
Rcjgahd | {h}
Rckgahd | {h}
Rclgahd | {h}
Rcmgahd | {h}
Rcngahd | {h}
Rcogahd | {h}
Rcpgahd | {h}
Rcqgahd | {h}
Rcrgahd | {h}
Rdsgahd | {h}
Rdtgahd | {h}
Rdugahd | {h}
Rdvgahd | {h}
Rdwgahd | {h}
Rdxgahd | {h}
Rdygahd | {h}
Rdzgahd | {z}
Sadgahd | {h}
Sbegahd | {h}
Sbfgahd | {h}
Sbggahd | {h}
Sbhgahd | {h}
Sbigahd | {h}
Scjgahd | {h}
Sckgahd | {h}
Sclgahd | {h}
Scmgahd | {h}
Scngahd | {h}
Scogahd | {h}
Scpgahd | {h}
Scqgahd | {h}
Scrgahd | {h}
Sdsgahd | {h}
Sdtgahd | {h}
Sdugahd | {h}
Sdvgahd | {h}
Sdwgahd | {h}
Sdxgahd | {h}
Sdygahd | {h}
Sdzgahd | {z}
Uadgahd | {h}
Ubegahd | {h}
Ubfgahd | {h}
Ubggahd | {h}
Ubhgahd | {h}
Ubigahd | {h}
Ucjgahd | {h}
Uckgahd | {h}
Uclgahd | {h}
Ucmgahd | {h}
Ucngahd | {h}
Ucogahd | {h}
Ucpgahd | {h}
Ucqgahd | {h}
Ucrgahd | {h}
Udsgahd | {h}
Udtgahd | {h}
Udugahd | {h}
Udvgahd | {h}
Udwgahd | {h}
Udxgahd | {h}
Udygahd | {h}
Udzgahd | {z}
Vadgahd | {h}
Vbegahd | {h}
Vbfgahd | {h}
Vbggahd | {h}
Vbhgahd | {h}
Vbigahd | {h}
Vcjgahd | {h}
Vckgahd | {h}
Vclgahd | {h}
Vcmgahd | {h}
Vcngahd | {h}
Vcogahd | {h}
Vcpgahd | {h}
Vcqgahd | {h}
Vcrgahd | {h}
Vdsgahd | {h}
Vdtgahd | {h}
Vdugahd | {h}
Vdvgahd | {h}
Vdwgahd | {h}
Vdxgahd | {h}
Vdygahd | {h}
Vdzgahd | {z}
Wadgahd | {h}
Wbegahd | {h}
Wbfgahd | {h}
Wbggahd | {h}
Wbhgahd | {h}
Wbigahd | {h}
Wcjgahd | {h}
Wckgahd | {h}
Wclgahd | {h}
Wcmgahd | {h}
Wcngahd | {h}
Wcogahd | {h}
Wcpgahd | {h}
Wcqgahd | {h}
Wcrgahd | {h}
Wdsgahd | {h}
Wdtgahd | {h}
Wdugahd | {h}
Wdvgahd | {h}
Wdwgahd | {h}
Wdxgahd | {h}
Wdygahd | {h}
Wdzgahd | {z}
Xadgahd | {h}
Xbegahd | {h}
Xbfgahd | {h}
Xbggahd | {h}
Xbhgahd | {h}
Xbigahd | {h}
Xcjgahd | {h}
Xckgahd | {h}
Xclgahd | {h}
Xcmgahd | {h}
Xcngahd | {h}
Xcogahd | {h}
Xcpgahd | {h}
Xcqgahd | {h}
Xcrgahd | {h}
Xdsgahd | {h}
Xdtgahd | {h}
Xdugahd | {h}
Xdvgahd | {h}
Xdwgahd | {h}
Xdxgahd | {h}
Xdygahd | {h}
Xdzgahd | {z}
Yadgahd | {h}
Ybegahd | {h}
Ybfgahd | {h}
Ybggahd | {h}
Ybhgahd | {h}
Ybigahd | {h}
Ycjgahd | {h}
Yckgahd | {h}
Yclgahd | {h}
Ycmgahd | {h}
Ycngahd | {h}
Ycogahd | {h}
Ycpgahd | {h}
Ycqgahd | {h}
Ycrgahd | {h}
Ydsgahd | {h}
Ydtgahd | {h}
Ydugahd | {h}
Ydvgahd | {h}
Ydwgahd | {h}
Ydxgahd | {h}
Ydygahd | {h}
Ydzgahd | {z}
Zadgahd | {Z}
Zbegahd | {Z}
Zbfgahd | {Z}
Zbggahd | {Z}
Zbhgahd | {Z}
Zbigahd | {Z}
Zcjgahd | {Z}
Zckgahd | {Z}
Zclgahd | {Z}
Zcmgahd | {Z}
Zcngahd | {Z}
Zcogahd | {Z}
Zcpgahd | {Z}
Zcqgahd | {Z}
Zcrgahd | {Z}
Zdsgahd | {Z}
Zdtgahd | {Z}
Zdugahd | {Z}
Zdvgahd | {Z}
Zdwgahd | {Z}
Zdxgahd | {Z}
Zdygahd | {Z}
Zdzgahd | {Z}
(644 rows)
-- lname | regexp_matches
-----------+----------------
-- Aadgahd | {h}
-- Abegahd | {h}
-- Abfgahd | {h}
--..............
-- Gdygahd | {h}
-- Gdzgahd | {z}
-- Hadgahd | {H}
-- Hbegahd | {H}
--..............
-- Ydygahd | {h}
-- Ydzgahd | {z}
-- Zadgahd | {Z}
--..............
-- Zdxgahd | {Z}
-- Zdygahd | {Z}
-- Zdzgahd | {Z}
--(644 rows)
select DISTINCT fname, regexp_matches(fname, '(h){2}','i') from phone_book_substr ;
fname | regexp_matches
-------+----------------
(0 rows)
-- fname | regexp_matches
-------+----------------
--(0 rows)
--Two or more matches.
select DISTINCT lname, regexp_matches(lname, '(h){2,}','i') from phone_book_substr ;
lname | regexp_matches
-------+----------------
(0 rows)
-- lname | regexp_matches
-------+----------------
--(0 rows)
select DISTINCT fname, regexp_matches(fname, '(x){2}','i') from phone_book_substr ;
fname | regexp_matches
---------+----------------
Xxhdadj | {x}
(1 row)
-- fname | regexp_matches
-----------+----------------
-- Xxhdadj | {x}
--(1 row)
select DISTINCT fname, regexp_matches(fname, '(x){3}','i') from phone_book_substr ;
fname | regexp_matches
-------+----------------
(0 rows)
-- fname | regexp_matches
-------+----------------
--(0 rows)
select DISTINCT lname, regexp_matches(lname, '(c){2}','i') from phone_book_substr order by lname;
lname | regexp_matches
---------+----------------
Ccjgahd | {c}
Cckgahd | {c}
Cclgahd | {c}
Ccmgahd | {c}
Ccngahd | {c}
Ccogahd | {c}
Ccpgahd | {c}
Ccqgahd | {c}
Ccrgahd | {c}
(9 rows)
-- lname | regexp_matches
-----------+----------------
-- Ccjgahd | {c}
-- Cckgahd | {c}
-- Cclgahd | {c}
-- Ccmgahd | {c}
-- Ccngahd | {c}
-- Ccogahd | {c}
-- Ccpgahd | {c}
-- Ccqgahd | {c}
-- Ccrgahd | {c}
--(9 rows)
-----------------------------------------------------------------------
--Constraints
-----------
--re - Regular Expression.
--Constraint Description
--------------------------------------------------------------------------
-- ^ matches at the beginning of the string
-- $ matches at the end of the string
-- (?=re) positive lookahead matches at any point where a substring matching
-- re begins (AREs only)
-- (?!re) negative lookahead matches at any point where no substring matching
-- re begins (AREs only)
-----------------------------------------------------------------------
select DISTINCT lname, regexp_matches(lname, '^z', 'i') from phone_book_substr order by lname;
lname | regexp_matches
---------+----------------
Zadgahd | {Z}
Zbegahd | {Z}
Zbfgahd | {Z}
Zbggahd | {Z}
Zbhgahd | {Z}
Zbigahd | {Z}
Zcjgahd | {Z}
Zckgahd | {Z}
Zclgahd | {Z}
Zcmgahd | {Z}
Zcngahd | {Z}
Zcogahd | {Z}
Zcpgahd | {Z}
Zcqgahd | {Z}
Zcrgahd | {Z}
Zdsgahd | {Z}
Zdtgahd | {Z}
Zdugahd | {Z}
Zdvgahd | {Z}
Zdwgahd | {Z}
Zdxgahd | {Z}
Zdygahd | {Z}
Zdzgahd | {Z}
(23 rows)
-- lname | regexp_matches
-----------+----------------
-- Zadgahd | {Z}
-- Zbegahd | {Z}
--..............
-- Zdygahd | {Z}
-- Zdzgahd | {Z}
--(23 rows)
select DISTINCT lname, regexp_matches(lname, '$z', 'i') from phone_book_substr;
lname | regexp_matches
-------+----------------
(0 rows)
-- lname | regexp_matches
-------+----------------
--(0 rows)
select DISTINCT lname, regexp_matches(lname, 'z$') from phone_book_substr;
lname | regexp_matches
-------+----------------
(0 rows)
-- lname | regexp_matches
-------+----------------
--(0 rows)
select DISTINCT lname, regexp_matches(lname, 'd$') from phone_book_substr order by lname;
lname | regexp_matches
---------+----------------
Aadgahd | {d}
Abegahd | {d}
Abfgahd | {d}
Abggahd | {d}
Abhgahd | {d}
Abigahd | {d}
Acjgahd | {d}
Ackgahd | {d}
Aclgahd | {d}
Acmgahd | {d}
Acngahd | {d}
Acogahd | {d}
Acpgahd | {d}
Acqgahd | {d}
Acrgahd | {d}
Adsgahd | {d}
Adtgahd | {d}
Adugahd | {d}
Advgahd | {d}
Adwgahd | {d}
Adxgahd | {d}
Adygahd | {d}
Adzgahd | {d}
Badgahd | {d}
Bbegahd | {d}
Bbfgahd | {d}
Bbggahd | {d}
Bbhgahd | {d}
Bbigahd | {d}
Bcjgahd | {d}
Bckgahd | {d}
Bclgahd | {d}
Bcmgahd | {d}
Bcngahd | {d}
Bcogahd | {d}
Bcpgahd | {d}
Bcqgahd | {d}
Bcrgahd | {d}
Bdsgahd | {d}
Bdtgahd | {d}
Bdugahd | {d}
Bdvgahd | {d}
Bdwgahd | {d}
Bdxgahd | {d}
Bdygahd | {d}
Bdzgahd | {d}
Cadgahd | {d}
Cbegahd | {d}
Cbfgahd | {d}
Cbggahd | {d}
Cbhgahd | {d}
Cbigahd | {d}
Ccjgahd | {d}
Cckgahd | {d}
Cclgahd | {d}
Ccmgahd | {d}
Ccngahd | {d}
Ccogahd | {d}
Ccpgahd | {d}
Ccqgahd | {d}
Ccrgahd | {d}
Cdsgahd | {d}
Cdtgahd | {d}
Cdugahd | {d}
Cdvgahd | {d}
Cdwgahd | {d}
Cdxgahd | {d}
Cdygahd | {d}
Cdzgahd | {d}
Dadgahd | {d}
Dbegahd | {d}
Dbfgahd | {d}
Dbggahd | {d}
Dbhgahd | {d}
Dbigahd | {d}
Dcjgahd | {d}
Dckgahd | {d}
Dclgahd | {d}
Dcmgahd | {d}
Dcngahd | {d}
Dcogahd | {d}
Dcpgahd | {d}
Dcqgahd | {d}
Dcrgahd | {d}
Ddsgahd | {d}
Ddtgahd | {d}
Ddugahd | {d}
Ddvgahd | {d}
Ddwgahd | {d}
Ddxgahd | {d}
Ddygahd | {d}
Ddzgahd | {d}
Eadgahd | {d}
Ebegahd | {d}
Ebfgahd | {d}
Ebggahd | {d}
Ebhgahd | {d}
Ebigahd | {d}
Ecjgahd | {d}
Eckgahd | {d}
Eclgahd | {d}
Ecmgahd | {d}
Ecngahd | {d}
Ecogahd | {d}
Ecpgahd | {d}
Ecqgahd | {d}
Ecrgahd | {d}
Edsgahd | {d}
Edtgahd | {d}
Edugahd | {d}
Edvgahd | {d}
Edwgahd | {d}
Edxgahd | {d}
Edygahd | {d}
Edzgahd | {d}
Fadgahd | {d}
Fbegahd | {d}
Fbfgahd | {d}
Fbggahd | {d}
Fbhgahd | {d}
Fbigahd | {d}
Fcjgahd | {d}
Fckgahd | {d}
Fclgahd | {d}
Fcmgahd | {d}
Fcngahd | {d}
Fcogahd | {d}
Fcpgahd | {d}
Fcqgahd | {d}
Fcrgahd | {d}
Fdsgahd | {d}
Fdtgahd | {d}
Fdugahd | {d}
Fdvgahd | {d}
Fdwgahd | {d}
Fdxgahd | {d}
Fdygahd | {d}
Fdzgahd | {d}
Gadgahd | {d}
Gbegahd | {d}
Gbfgahd | {d}
Gbggahd | {d}
Gbhgahd | {d}
Gbigahd | {d}
Gcjgahd | {d}
Gckgahd | {d}
Gclgahd | {d}
Gcmgahd | {d}
Gcngahd | {d}
Gcogahd | {d}
Gcpgahd | {d}
Gcqgahd | {d}
Gcrgahd | {d}
Gdsgahd | {d}
Gdtgahd | {d}
Gdugahd | {d}
Gdvgahd | {d}
Gdwgahd | {d}
Gdxgahd | {d}
Gdygahd | {d}
Gdzgahd | {d}
Hadgahd | {d}
Hbegahd | {d}
Hbfgahd | {d}
Hbggahd | {d}
Hbhgahd | {d}
Hbigahd | {d}
Hcjgahd | {d}
Hckgahd | {d}
Hclgahd | {d}
Hcmgahd | {d}
Hcngahd | {d}
Hcogahd | {d}
Hcpgahd | {d}
Hcqgahd | {d}
Hcrgahd | {d}
Hdsgahd | {d}
Hdtgahd | {d}
Hdugahd | {d}
Hdvgahd | {d}
Hdwgahd | {d}
Hdxgahd | {d}
Hdygahd | {d}
Hdzgahd | {d}
Iadgahd | {d}
Ibegahd | {d}
Ibfgahd | {d}
Ibggahd | {d}
Ibhgahd | {d}
Ibigahd | {d}
Icjgahd | {d}
Ickgahd | {d}
Iclgahd | {d}
Icmgahd | {d}
Icngahd | {d}
Icogahd | {d}
Icpgahd | {d}
Icqgahd | {d}
Icrgahd | {d}
Idsgahd | {d}
Idtgahd | {d}
Idugahd | {d}
Idvgahd | {d}
Idwgahd | {d}
Idxgahd | {d}
Idygahd | {d}
Idzgahd | {d}
Jadgahd | {d}
Jbegahd | {d}
Jbfgahd | {d}
Jbggahd | {d}
Jbhgahd | {d}
Jbigahd | {d}
Jcjgahd | {d}
Jckgahd | {d}
Jclgahd | {d}
Jcmgahd | {d}
Jcngahd | {d}
Jcogahd | {d}
Jcpgahd | {d}
Jcqgahd | {d}
Jcrgahd | {d}
Jdsgahd | {d}
Jdtgahd | {d}
Jdugahd | {d}
Jdvgahd | {d}
Jdwgahd | {d}
Jdxgahd | {d}
Jdygahd | {d}
Jdzgahd | {d}
Kadgahd | {d}
Kbegahd | {d}
Kbfgahd | {d}
Kbggahd | {d}
Kbhgahd | {d}
Kbigahd | {d}
Kcjgahd | {d}
Kckgahd | {d}
Kclgahd | {d}
Kcmgahd | {d}
Kcngahd | {d}
Kcogahd | {d}
Kcpgahd | {d}
Kcqgahd | {d}
Kcrgahd | {d}
Kdsgahd | {d}
Kdtgahd | {d}
Kdugahd | {d}
Kdvgahd | {d}
Kdwgahd | {d}
Kdxgahd | {d}
Kdygahd | {d}
Kdzgahd | {d}
Kedgahd | {d}
Keegahd | {d}
Kefgahd | {d}
Keggahd | {d}
Kehgahd | {d}
Keigahd | {d}
Kejgahd | {d}
Kekgahd | {d}
Kelgahd | {d}
Kemgahd | {d}
Kengahd | {d}
Keogahd | {d}
Kepgahd | {d}
Keqgahd | {d}
Kergahd | {d}
Kesgahd | {d}
Ketgahd | {d}
Keugahd | {d}
Kevgahd | {d}
Kewgahd | {d}
Kexgahd | {d}
Keygahd | {d}
Kezgahd | {d}
Ladgahd | {d}
Lbegahd | {d}
Lbfgahd | {d}
Lbggahd | {d}
Lbhgahd | {d}
Lbigahd | {d}
Lcjgahd | {d}
Lckgahd | {d}
Lclgahd | {d}
Lcmgahd | {d}
Lcngahd | {d}
Lcogahd | {d}
Lcpgahd | {d}
Lcqgahd | {d}
Lcrgahd | {d}
Ldsgahd | {d}
Ldtgahd | {d}
Ldugahd | {d}
Ldvgahd | {d}
Ldwgahd | {d}
Ldxgahd | {d}
Ldygahd | {d}
Ldzgahd | {d}
Lidgahd | {d}
Liegahd | {d}
Lifgahd | {d}
Liggahd | {d}
Lihgahd | {d}
Liigahd | {d}
Lijgahd | {d}
Likgahd | {d}
Lilgahd | {d}
Limgahd | {d}
Lingahd | {d}
Liogahd | {d}
Lipgahd | {d}
Liqgahd | {d}
Lirgahd | {d}
Lisgahd | {d}
Litgahd | {d}
Liugahd | {d}
Livgahd | {d}
Liwgahd | {d}
Lixgahd | {d}
Liygahd | {d}
Lizgahd | {d}
Madgahd | {d}
Mbegahd | {d}
Mbfgahd | {d}
Mbggahd | {d}
Mbhgahd | {d}
Mbigahd | {d}
Mcjgahd | {d}
Mckgahd | {d}
Mclgahd | {d}
Mcmgahd | {d}
Mcngahd | {d}
Mcogahd | {d}
Mcpgahd | {d}
Mcqgahd | {d}
Mcrgahd | {d}
Mdsgahd | {d}
Mdtgahd | {d}
Mdugahd | {d}
Mdvgahd | {d}
Mdwgahd | {d}
Mdxgahd | {d}
Mdygahd | {d}
Mdzgahd | {d}
Modgahd | {d}
Moegahd | {d}
Mofgahd | {d}
Moggahd | {d}
Mohgahd | {d}
Moigahd | {d}
Mojgahd | {d}
Mokgahd | {d}
Molgahd | {d}
Momgahd | {d}
Mongahd | {d}
Moogahd | {d}
Mopgahd | {d}
Moqgahd | {d}
Morgahd | {d}
Mosgahd | {d}
Motgahd | {d}
Mougahd | {d}
Movgahd | {d}
Mowgahd | {d}
Moxgahd | {d}
Moygahd | {d}
Mozgahd | {d}
Nadgahd | {d}
Nbegahd | {d}
Nbfgahd | {d}
Nbggahd | {d}
Nbhgahd | {d}
Nbigahd | {d}
Ncjgahd | {d}
Nckgahd | {d}
Nclgahd | {d}
Ncmgahd | {d}
Ncngahd | {d}
Ncogahd | {d}
Ncpgahd | {d}
Ncqgahd | {d}
Ncrgahd | {d}
Ndsgahd | {d}
Ndtgahd | {d}
Ndugahd | {d}
Ndvgahd | {d}
Ndwgahd | {d}
Ndxgahd | {d}
Ndygahd | {d}
Ndzgahd | {d}
Nudgahd | {d}
Nuegahd | {d}
Nufgahd | {d}
Nuggahd | {d}
Nuhgahd | {d}
Nuigahd | {d}
Nujgahd | {d}
Nukgahd | {d}
Nulgahd | {d}
Numgahd | {d}
Nungahd | {d}
Nuogahd | {d}
Nupgahd | {d}
Nuqgahd | {d}
Nurgahd | {d}
Nusgahd | {d}
Nutgahd | {d}
Nuugahd | {d}
Nuvgahd | {d}
Nuwgahd | {d}
Nuxgahd | {d}
Nuygahd | {d}
Nuzgahd | {d}
Oadgahd | {d}
Obegahd | {d}
Obfgahd | {d}
Obggahd | {d}
Obhgahd | {d}
Obigahd | {d}
Ocjgahd | {d}
Ockgahd | {d}
Oclgahd | {d}
Ocmgahd | {d}
Ocngahd | {d}
Ocogahd | {d}
Ocpgahd | {d}
Ocqgahd | {d}
Ocrgahd | {d}
Odsgahd | {d}
Odtgahd | {d}
Odugahd | {d}
Odvgahd | {d}
Odwgahd | {d}
Odxgahd | {d}
Odygahd | {d}
Odzgahd | {d}
Padgahd | {d}
Pbegahd | {d}
Pbfgahd | {d}
Pbggahd | {d}
Pbhgahd | {d}
Pbigahd | {d}
Pcjgahd | {d}
Pckgahd | {d}
Pclgahd | {d}
Pcmgahd | {d}
Pcngahd | {d}
Pcogahd | {d}
Pcpgahd | {d}
Pcqgahd | {d}
Pcrgahd | {d}
Pdsgahd | {d}
Pdtgahd | {d}
Pdugahd | {d}
Pdvgahd | {d}
Pdwgahd | {d}
Pdxgahd | {d}
Pdygahd | {d}
Pdzgahd | {d}
Radgahd | {d}
Rbegahd | {d}
Rbfgahd | {d}
Rbggahd | {d}
Rbhgahd | {d}
Rbigahd | {d}
Rcjgahd | {d}
Rckgahd | {d}
Rclgahd | {d}
Rcmgahd | {d}
Rcngahd | {d}
Rcogahd | {d}
Rcpgahd | {d}
Rcqgahd | {d}
Rcrgahd | {d}
Rdsgahd | {d}
Rdtgahd | {d}
Rdugahd | {d}
Rdvgahd | {d}
Rdwgahd | {d}
Rdxgahd | {d}
Rdygahd | {d}
Rdzgahd | {d}
Sadgahd | {d}
Sbegahd | {d}
Sbfgahd | {d}
Sbggahd | {d}
Sbhgahd | {d}
Sbigahd | {d}
Scjgahd | {d}
Sckgahd | {d}
Sclgahd | {d}
Scmgahd | {d}
Scngahd | {d}
Scogahd | {d}
Scpgahd | {d}
Scqgahd | {d}
Scrgahd | {d}
Sdsgahd | {d}
Sdtgahd | {d}
Sdugahd | {d}
Sdvgahd | {d}
Sdwgahd | {d}
Sdxgahd | {d}
Sdygahd | {d}
Sdzgahd | {d}
Uadgahd | {d}
Ubegahd | {d}
Ubfgahd | {d}
Ubggahd | {d}
Ubhgahd | {d}
Ubigahd | {d}
Ucjgahd | {d}
Uckgahd | {d}
Uclgahd | {d}
Ucmgahd | {d}
Ucngahd | {d}
Ucogahd | {d}
Ucpgahd | {d}
Ucqgahd | {d}
Ucrgahd | {d}
Udsgahd | {d}
Udtgahd | {d}
Udugahd | {d}
Udvgahd | {d}
Udwgahd | {d}
Udxgahd | {d}
Udygahd | {d}
Udzgahd | {d}
Vadgahd | {d}
Vbegahd | {d}
Vbfgahd | {d}
Vbggahd | {d}
Vbhgahd | {d}
Vbigahd | {d}
Vcjgahd | {d}
Vckgahd | {d}
Vclgahd | {d}
Vcmgahd | {d}
Vcngahd | {d}
Vcogahd | {d}
Vcpgahd | {d}
Vcqgahd | {d}
Vcrgahd | {d}
Vdsgahd | {d}
Vdtgahd | {d}
Vdugahd | {d}
Vdvgahd | {d}
Vdwgahd | {d}
Vdxgahd | {d}
Vdygahd | {d}
Vdzgahd | {d}
Wadgahd | {d}
Wbegahd | {d}
Wbfgahd | {d}
Wbggahd | {d}
Wbhgahd | {d}
Wbigahd | {d}
Wcjgahd | {d}
Wckgahd | {d}
Wclgahd | {d}
Wcmgahd | {d}
Wcngahd | {d}
Wcogahd | {d}
Wcpgahd | {d}
Wcqgahd | {d}
Wcrgahd | {d}
Wdsgahd | {d}
Wdtgahd | {d}
Wdugahd | {d}
Wdvgahd | {d}
Wdwgahd | {d}
Wdxgahd | {d}
Wdygahd | {d}
Wdzgahd | {d}
Xadgahd | {d}
Xbegahd | {d}
Xbfgahd | {d}
Xbggahd | {d}
Xbhgahd | {d}
Xbigahd | {d}
Xcjgahd | {d}
Xckgahd | {d}
Xclgahd | {d}
Xcmgahd | {d}
Xcngahd | {d}
Xcogahd | {d}
Xcpgahd | {d}
Xcqgahd | {d}
Xcrgahd | {d}
Xdsgahd | {d}
Xdtgahd | {d}
Xdugahd | {d}
Xdvgahd | {d}
Xdwgahd | {d}
Xdxgahd | {d}
Xdygahd | {d}
Xdzgahd | {d}
Yadgahd | {d}
Ybegahd | {d}
Ybfgahd | {d}
Ybggahd | {d}
Ybhgahd | {d}
Ybigahd | {d}
Ycjgahd | {d}
Yckgahd | {d}
Yclgahd | {d}
Ycmgahd | {d}
Ycngahd | {d}
Ycogahd | {d}
Ycpgahd | {d}
Ycqgahd | {d}
Ycrgahd | {d}
Ydsgahd | {d}
Ydtgahd | {d}
Ydugahd | {d}
Ydvgahd | {d}
Ydwgahd | {d}
Ydxgahd | {d}
Ydygahd | {d}
Ydzgahd | {d}
Zadgahd | {d}
Zbegahd | {d}
Zbfgahd | {d}
Zbggahd | {d}
Zbhgahd | {d}
Zbigahd | {d}
Zcjgahd | {d}
Zckgahd | {d}
Zclgahd | {d}
Zcmgahd | {d}
Zcngahd | {d}
Zcogahd | {d}
Zcpgahd | {d}
Zcqgahd | {d}
Zcrgahd | {d}
Zdsgahd | {d}
Zdtgahd | {d}
Zdugahd | {d}
Zdvgahd | {d}
Zdwgahd | {d}
Zdxgahd | {d}
Zdygahd | {d}
Zdzgahd | {d}
(644 rows)
-- lname | regexp_matches
---------+----------------
-- Aadgahd | {d}
-- Abegahd | {d}
-- Abfgahd | {d}
--................
-- Zdygahd | {d}
-- Zdzgahd | {d}
--(644 rows)
--
--(?=re) positive lookahead matches at any point where a substring matching
-- re begins (AREs only)
--select DISTINCT lname, regexp_matches(lname, '(?=zd)', 'i') from phone_book_substr;
-- lname | regexp_matches
-----------+----------------
-- Zdsgahd | {""}
-- Zdtgahd | {""}
-- Zdugahd | {""}
-- Zdvgahd | {""}
-- Zdwgahd | {""}
-- Zdxgahd | {""}
-- Zdygahd | {""}
-- Zdzgahd | {""}
--(8 rows)
--select DISTINCT lname, regexp_matches(lname, '(?=wg)', 'i') from phone_book_substr;
-- lname | regexp_matches
-----------+----------------
-- Adwgahd | {""}
-- Bdwgahd | {""}
--................
-- Xdwgahd | {""}
-- Ydwgahd | {""}
-- Zdwgahd | {""}
--(28 rows)
--select DISTINCT lname, regexp_matches(lname, '(?=Ad)', 'i') from phone_book_substr;
-- lname | regexp_matches
-----------+----------------
-- Aadgahd | {""}
-- Adsgahd | {""}
-- Adtgahd | {""}
--................
-- Yadgahd | {""}
-- Zadgahd | {""}
--(32 rows)
--
--
--(?!re) negative lookahead matches at any point where no substring matching
-- re begins (AREs only)
--select DISTINCT lname, regexp_matches(lname, '(?!Ad)', 'i') from phone_book_substr;
-- lname | regexp_matches
-----------+----------------
-- Aadgahd | {""}
-- Abegahd | {""}
--...............
-- Zdygahd | {""}
-- Zdzgahd | {""}
--(644 rows)
--select DISTINCT lname, regexp_matches(lname, '(?!hd)', 'i') from phone_book_substr;
-- lname | regexp_matches
-----------+----------------
-- Aadgahd | {""}
-- Abegahd | {""}
--...............
-- Zdxgahd | {""}
-- Zdygahd | {""}
-- Zdzgahd | {""}
--(644 rows)
-----------------------------------------------------------------------
-----------------------------------------------------------------------
--where substring(lname from '%\\"yg\\"%' for '\\') IS NOT NULL
--;
-----------------------------------------------------------------------
-- Function regexp_split_to_table returns all the captured substrings
-- that match with the pattern.
-- select regexp_split_to_table(string, pattern [,flags])');
-- this function splits a string using a POSIX regular expression
-- pattern as a delimiter.
select foo from regexp_split_to_table('the quick brown fox jumped over the lazy dog',E'\\\s+') AS foo;
foo
--------
the
quick
brown
fox
jumped
over
the
lazy
dog
(9 rows)
SELECT foo FROM regexp_split_to_table('the quick brown fox', E'\\s*') AS foo;
foo
-----
t
h
e
q
u
i
c
k
b
r
o
w
n
f
o
x
(16 rows)
-----------------------------------------------------------------------
----------------------------------------------------------
---substring(string from pattern for escape character)
-- provides extraction of a substring that matches a SQL
-- regular expression. To indicate the part of the pattern
-- that should be returned on success, the pattern must
-- contain two occurrences of the escape character
-- followed by a double quote ("). The
-- text matching the portion of the pattern between these markers
-- is returned.
----------------------------------------------------------
select substring('foobar' from 'foo');
substring
-----------
foo
(1 row)
--returns foo
select substring('foobar' from 'oba');
substring
-----------
oba
(1 row)
--returns oba
select substring('foobar' from 'oo%');
substring
-----------
(1 row)
--returns nothing
--select substring('foobar' from '%"o_b#"%' for '#');
--returns nothing
select substring('foobar' from '%#"o_b#"%' for '#');
substring
-----------
oob
(1 row)
--returns oob
select count(substring(lname from '%#"o_b#"%' for '#'))
from phone_book_substr;
count
-------
0
(1 row)
--0
select count(substring(lname from '%#"Ab#"%' for '#'))
from phone_book_substr;
count
-------
135
(1 row)
--135
select substring(lname from '%#"Ab#"%' for '#')
from phone_book_substr
where substring(lname from '%#"Ab#"%' for '#') IS NOT NULL;
substring
-----------
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
Ab
(135 rows)
--returns 'Ab' 135 times.
select substring(lname from '%#"Zd#"%' for '#')
from phone_book_substr
where substring(lname from '%#"Zd#"%' for '#') IS NOT NULL
;
substring
-----------
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
Zd
(216 rows)
--returns 'Zd' 216 times.
select substring(lname from '%#"Z_k#"%' for '#')
from phone_book_substr
where substring(lname from '%#"Z_k#"%' for '#') IS NOT NULL
;
substring
-----------
Zck
Zck
Zck
Zck
Zck
Zck
Zck
Zck
Zck
Zck
Zck
Zck
Zck
Zck
Zck
Zck
Zck
Zck
Zck
Zck
Zck
Zck
Zck
Zck
Zck
Zck
Zck
(27 rows)
--returns 'Zck' 27 times.
select lname, substring(lname from '%#"Z_y#"%' for '#')
from phone_book_substr
where substring(lname from '%#"Z_y#"%' for '#') IS NOT NULL
;
lname | substring
---------+-----------
Zdygahd | Zdy
Zdygahd | Zdy
Zdygahd | Zdy
Zdygahd | Zdy
Zdygahd | Zdy
Zdygahd | Zdy
Zdygahd | Zdy
Zdygahd | Zdy
Zdygahd | Zdy
Zdygahd | Zdy
Zdygahd | Zdy
Zdygahd | Zdy
Zdygahd | Zdy
Zdygahd | Zdy
Zdygahd | Zdy
Zdygahd | Zdy
Zdygahd | Zdy
Zdygahd | Zdy
Zdygahd | Zdy
Zdygahd | Zdy
Zdygahd | Zdy
Zdygahd | Zdy
Zdygahd | Zdy
Zdygahd | Zdy
Zdygahd | Zdy
Zdygahd | Zdy
Zdygahd | Zdy
(27 rows)
-- returns 27 rows.
-- lname | substring
---------+-----------
-- Zdygahd | Zdy
select lname, substring(lname from '%#"Z_yg_h#"%' for '#')
from phone_book_substr
where substring(lname from '%#"Z_yg_h#"%' for '#') IS NOT NULL
;
lname | substring
---------+-----------
Zdygahd | Zdygah
Zdygahd | Zdygah
Zdygahd | Zdygah
Zdygahd | Zdygah
Zdygahd | Zdygah
Zdygahd | Zdygah
Zdygahd | Zdygah
Zdygahd | Zdygah
Zdygahd | Zdygah
Zdygahd | Zdygah
Zdygahd | Zdygah
Zdygahd | Zdygah
Zdygahd | Zdygah
Zdygahd | Zdygah
Zdygahd | Zdygah
Zdygahd | Zdygah
Zdygahd | Zdygah
Zdygahd | Zdygah
Zdygahd | Zdygah
Zdygahd | Zdygah
Zdygahd | Zdygah
Zdygahd | Zdygah
Zdygahd | Zdygah
Zdygahd | Zdygah
Zdygahd | Zdygah
Zdygahd | Zdygah
Zdygahd | Zdygah
(27 rows)
-- returns 27 rows.
-- lname | substring
---------+-----------
-- Zdygahd | Zdy
--select lname, substring(lname from '%\\"Z_yg_h\\"%' for '\\')
--from phone_book_substr
--where substring(lname from '%\\"Z_yg_h\\"%' for '\\') IS NOT NULL
--;
-- returns 27 rows.
-- lname | substring
---------+-----------
-- Zdygahd | Zdy
--select DISTINCT lname, substring(lname from '%\\"__yg_h\\"%' for '\\')
--from phone_book_substr
--where substring(lname from '%\\"__yg_h\\"%' for '\\') IS NOT NULL
--;
--dygahd | Adygah
-- Bdygahd | Bdygah
-- Cdygahd | Cdygah
-- Ddygahd | Ddygah
-- Edygahd | Edygah
-- Fdygahd | Fdygah
-- Gdygahd | Gdygah
-- Hdygahd | Hdygah
-- Idygahd | Idygah
-- Jdygahd | Jdygah
-- Kdygahd | Kdygah
-- Keygahd | Keygah
-- Ldygahd | Ldygah
-- Liygahd | Liygah
-- Mdygahd | Mdygah
-- Moygahd | Moygah
-- Ndygahd | Ndygah
-- Nuygahd | Nuygah
-- Odygahd | Odygah
-- Pdygahd | Pdygah
-- Rdygahd | Rdygah
-- Sdygahd | Sdygah
-- Udygahd | Udygah
-- Gdygahd | Gdygah
-- Hdygahd | Hdygah
-- Idygahd | Idygah
-- Jdygahd | Jdygah
-- Kdygahd | Kdygah
-- Keygahd | Keygah
-- Ldygahd | Ldygah
-- Liygahd | Liygah
-- Mdygahd | Mdygah
-- Moygahd | Moygah
-- Ndygahd | Ndygah
-- Nuygahd | Nuygah
-- Odygahd | Odygah
-- Pdygahd | Pdygah
-- Rdygahd | Rdygah
-- Sdygahd | Sdygah
-- Udygahd | Udygah
-- Vdygahd | Vdygah
-- Wdygahd | Wdygah
-- Xdygahd | Xdygah
-- Ydygahd | Ydygah
-- Zdygahd | Zdygah
select count(*)
from phone_book_substr
;
count
-------
17388
(1 row)
--17388
---------------------------------------------------------
select lname_substr
from phone_book_substr
where lname_substr LIKE 'Aa' group by 1 order by 1;
lname_substr
--------------
(0 rows)
--0 Rows.
select lname_substr
from phone_book_substr
where lname_substr LIKE 'A%' group by 1 order by 1;
lname_substr
--------------
Aad
Abe
Abf
Abg
Abh
Abi
Acj
Ack
Acl
Acm
Acn
Aco
Acp
Acq
Acr
Ads
Adt
Adu
Adv
Adw
Adx
Ady
Adz
(23 rows)
select count(*)
from phone_book_substr
where lname_substr LIKE 'A%';
count
-------
621
(1 row)
--621
select lname_substr
from phone_book_substr
where lname_substr LIKE '_a_' group by 1 order by 1;
lname_substr
--------------
Aad
Bad
Cad
Dad
Ead
Fad
Gad
Had
Iad
Jad
Kad
Lad
Mad
Nad
Oad
Pad
Rad
Sad
Uad
Vad
Wad
Xad
Yad
Zad
(24 rows)
select lname_substr
from phone_book_substr
where lname_substr LIKE '_Z_' group by 1 order by 1;
lname_substr
--------------
(0 rows)
--0 Rows.
select lname_substr
from phone_book_substr
where lname_substr LIKE 'Abd' group by 1 order by 1;
lname_substr
--------------
(0 rows)
--0 Rows.
-- ~~ is equivalent to LIKE
select count(*)
from phone_book_substr
where lname_substr ~~ 'A%';
count
-------
621
(1 row)
--621
select count(*)
from phone_book_substr
where lname_substr ~~ '_b_';
count
-------
3240
(1 row)
--3240
-- ILIKE case sensitive LIKE
select count(*)
from phone_book_substr
where lname_substr ILIKE 'a%';
count
-------
621
(1 row)
-- ~~* is equivalent to ILIKE
select count(*)
from phone_book_substr
where lname_substr ~~* 'a%';
count
-------
621
(1 row)
--621
select count(*)
from phone_book_substr
where lname_substr ~~* '_b_';
count
-------
3240
(1 row)
--3240
-- NOT LIKE
select lname_substr
from phone_book_substr
where lname_substr NOT LIKE 'Z%' group by 1 order by 1;
lname_substr
--------------
Aad
Abe
Abf
Abg
Abh
Abi
Acj
Ack
Acl
Acm
Acn
Aco
Acp
Acq
Acr
Ads
Adt
Adu
Adv
Adw
Adx
Ady
Adz
Bad
Bbe
Bbf
Bbg
Bbh
Bbi
Bcj
Bck
Bcl
Bcm
Bcn
Bco
Bcp
Bcq
Bcr
Bds
Bdt
Bdu
Bdv
Bdw
Bdx
Bdy
Bdz
Cad
Cbe
Cbf
Cbg
Cbh
Cbi
Ccj
Cck
Ccl
Ccm
Ccn
Cco
Ccp
Ccq
Ccr
Cds
Cdt
Cdu
Cdv
Cdw
Cdx
Cdy
Cdz
Dad
Dbe
Dbf
Dbg
Dbh
Dbi
Dcj
Dck
Dcl
Dcm
Dcn
Dco
Dcp
Dcq
Dcr
Dds
Ddt
Ddu
Ddv
Ddw
Ddx
Ddy
Ddz
Ead
Ebe
Ebf
Ebg
Ebh
Ebi
Ecj
Eck
Ecl
Ecm
Ecn
Eco
Ecp
Ecq
Ecr
Eds
Edt
Edu
Edv
Edw
Edx
Edy
Edz
Fad
Fbe
Fbf
Fbg
Fbh
Fbi
Fcj
Fck
Fcl
Fcm
Fcn
Fco
Fcp
Fcq
Fcr
Fds
Fdt
Fdu
Fdv
Fdw
Fdx
Fdy
Fdz
Gad
Gbe
Gbf
Gbg
Gbh
Gbi
Gcj
Gck
Gcl
Gcm
Gcn
Gco
Gcp
Gcq
Gcr
Gds
Gdt
Gdu
Gdv
Gdw
Gdx
Gdy
Gdz
Had
Hbe
Hbf
Hbg
Hbh
Hbi
Hcj
Hck
Hcl
Hcm
Hcn
Hco
Hcp
Hcq
Hcr
Hds
Hdt
Hdu
Hdv
Hdw
Hdx
Hdy
Hdz
Iad
Ibe
Ibf
Ibg
Ibh
Ibi
Icj
Ick
Icl
Icm
Icn
Ico
Icp
Icq
Icr
Ids
Idt
Idu
Idv
Idw
Idx
Idy
Idz
Jad
Jbe
Jbf
Jbg
Jbh
Jbi
Jcj
Jck
Jcl
Jcm
Jcn
Jco
Jcp
Jcq
Jcr
Jds
Jdt
Jdu
Jdv
Jdw
Jdx
Jdy
Jdz
Kad
Kbe
Kbf
Kbg
Kbh
Kbi
Kcj
Kck
Kcl
Kcm
Kcn
Kco
Kcp
Kcq
Kcr
Kds
Kdt
Kdu
Kdv
Kdw
Kdx
Kdy
Kdz
Ked
Kee
Kef
Keg
Keh
Kei
Kej
Kek
Kel
Kem
Ken
Keo
Kep
Keq
Ker
Kes
Ket
Keu
Kev
Kew
Kex
Key
Kez
Lad
Lbe
Lbf
Lbg
Lbh
Lbi
Lcj
Lck
Lcl
Lcm
Lcn
Lco
Lcp
Lcq
Lcr
Lds
Ldt
Ldu
Ldv
Ldw
Ldx
Ldy
Ldz
Lid
Lie
Lif
Lig
Lih
Lii
Lij
Lik
Lil
Lim
Lin
Lio
Lip
Liq
Lir
Lis
Lit
Liu
Liv
Liw
Lix
Liy
Liz
Mad
Mbe
Mbf
Mbg
Mbh
Mbi
Mcj
Mck
Mcl
Mcm
Mcn
Mco
Mcp
Mcq
Mcr
Mds
Mdt
Mdu
Mdv
Mdw
Mdx
Mdy
Mdz
Mod
Moe
Mof
Mog
Moh
Moi
Moj
Mok
Mol
Mom
Mon
Moo
Mop
Moq
Mor
Mos
Mot
Mou
Mov
Mow
Mox
Moy
Moz
Nad
Nbe
Nbf
Nbg
Nbh
Nbi
Ncj
Nck
Ncl
Ncm
Ncn
Nco
Ncp
Ncq
Ncr
Nds
Ndt
Ndu
Ndv
Ndw
Ndx
Ndy
Ndz
Nud
Nue
Nuf
Nug
Nuh
Nui
Nuj
Nuk
Nul
Num
Nun
Nuo
Nup
Nuq
Nur
Nus
Nut
Nuu
Nuv
Nuw
Nux
Nuy
Nuz
Oad
Obe
Obf
Obg
Obh
Obi
Ocj
Ock
Ocl
Ocm
Ocn
Oco
Ocp
Ocq
Ocr
Ods
Odt
Odu
Odv
Odw
Odx
Ody
Odz
Pad
Pbe
Pbf
Pbg
Pbh
Pbi
Pcj
Pck
Pcl
Pcm
Pcn
Pco
Pcp
Pcq
Pcr
Pds
Pdt
Pdu
Pdv
Pdw
Pdx
Pdy
Pdz
Rad
Rbe
Rbf
Rbg
Rbh
Rbi
Rcj
Rck
Rcl
Rcm
Rcn
Rco
Rcp
Rcq
Rcr
Rds
Rdt
Rdu
Rdv
Rdw
Rdx
Rdy
Rdz
Sad
Sbe
Sbf
Sbg
Sbh
Sbi
Scj
Sck
Scl
Scm
Scn
Sco
Scp
Scq
Scr
Sds
Sdt
Sdu
Sdv
Sdw
Sdx
Sdy
Sdz
Uad
Ube
Ubf
Ubg
Ubh
Ubi
Ucj
Uck
Ucl
Ucm
Ucn
Uco
Ucp
Ucq
Ucr
Uds
Udt
Udu
Udv
Udw
Udx
Udy
Udz
Vad
Vbe
Vbf
Vbg
Vbh
Vbi
Vcj
Vck
Vcl
Vcm
Vcn
Vco
Vcp
Vcq
Vcr
Vds
Vdt
Vdu
Vdv
Vdw
Vdx
Vdy
Vdz
Wad
Wbe
Wbf
Wbg
Wbh
Wbi
Wcj
Wck
Wcl
Wcm
Wcn
Wco
Wcp
Wcq
Wcr
Wds
Wdt
Wdu
Wdv
Wdw
Wdx
Wdy
Wdz
Xad
Xbe
Xbf
Xbg
Xbh
Xbi
Xcj
Xck
Xcl
Xcm
Xcn
Xco
Xcp
Xcq
Xcr
Xds
Xdt
Xdu
Xdv
Xdw
Xdx
Xdy
Xdz
Yad
Ybe
Ybf
Ybg
Ybh
Ybi
Ycj
Yck
Ycl
Ycm
Ycn
Yco
Ycp
Ycq
Ycr
Yds
Ydt
Ydu
Ydv
Ydw
Ydx
Ydy
Ydz
(621 rows)
-- !~~ is equivalent to NOT LIKE
select count(*)
from phone_book_substr
where lname_substr !~~ 'A%';
count
-------
16767
(1 row)
--16767
select count(*)
from phone_book_substr
where lname_substr !~~ '_A%';
count
-------
17388
(1 row)
--17388
select count(*)
from phone_book_substr
where lname_substr !~~ '_b%';
count
-------
14148
(1 row)
--14148
select count(*)
from phone_book_substr
where lname_substr !~~ '_B%';
count
-------
17388
(1 row)
--17388
select count(*)
from phone_book_substr
where lname_substr !~~ '_b%';
count
-------
14148
(1 row)
--14148
-- !~~* is equivalent to NOT ILIKE
select count(*)
from phone_book_substr
where lname_substr !~~* 'a%';
count
-------
16767
(1 row)
--16767
select count(*)
from phone_book_substr
where lname_substr !~~* '_A%';
count
-------
16740
(1 row)
--16740
select count(*)
from phone_book_substr
where lname_substr !~~* '_b%';
count
-------
14148
(1 row)
--14148
select count(*)
from phone_book_substr
where lname_substr !~~* '_B%';
count
-------
14148
(1 row)
--14148
select count(*)
from phone_book_substr
where lname_substr !~~* '_B_';
count
-------
14148
(1 row)
--14148
select count(*)
from phone_book_substr
where lname_substr !~~* '_b_';
count
-------
14148
(1 row)
--14148
-- ARRAY
--select array(select fname
-- from phone_book_substr
-- where lname_substr LIKE '%y%');
select lname_substr
from phone_book_substr
where lname_substr similar to '(A|B)%' group by 1 order by 1;
lname_substr
--------------
Aad
Abe
Abf
Abg
Abh
Abi
Acj
Ack
Acl
Acm
Acn
Aco
Acp
Acq
Acr
Ads
Adt
Adu
Adv
Adw
Adx
Ady
Adz
Bad
Bbe
Bbf
Bbg
Bbh
Bbi
Bcj
Bck
Bcl
Bcm
Bcn
Bco
Bcp
Bcq
Bcr
Bds
Bdt
Bdu
Bdv
Bdw
Bdx
Bdy
Bdz
(46 rows)
select lname_substr
from phone_book_substr
where lname_substr similar to '(A|B)%' group by 1 order by 1;
lname_substr
--------------
Aad
Abe
Abf
Abg
Abh
Abi
Acj
Ack
Acl
Acm
Acn
Aco
Acp
Acq
Acr
Ads
Adt
Adu
Adv
Adw
Adx
Ady
Adz
Bad
Bbe
Bbf
Bbg
Bbh
Bbi
Bcj
Bck
Bcl
Bcm
Bcn
Bco
Bcp
Bcq
Bcr
Bds
Bdt
Bdu
Bdv
Bdw
Bdx
Bdy
Bdz
(46 rows)
--select array(select fname
-- from phone_book_substr
-- where lname_substr like '%y%');
select lname_substr
from phone_book_substr
where lname_substr like 'A%' group by 1 order by 1;
lname_substr
--------------
Aad
Abe
Abf
Abg
Abh
Abi
Acj
Ack
Acl
Acm
Acn
Aco
Acp
Acq
Acr
Ads
Adt
Adu
Adv
Adw
Adx
Ady
Adz
(23 rows)
select lname_substr
from phone_book_substr
where lname_substr similar to '(A|B)%' group by 1 order by 1;
lname_substr
--------------
Aad
Abe
Abf
Abg
Abh
Abi
Acj
Ack
Acl
Acm
Acn
Aco
Acp
Acq
Acr
Ads
Adt
Adu
Adv
Adw
Adx
Ady
Adz
Bad
Bbe
Bbf
Bbg
Bbh
Bbi
Bcj
Bck
Bcl
Bcm
Bcn
Bco
Bcp
Bcq
Bcr
Bds
Bdt
Bdu
Bdv
Bdw
Bdx
Bdy
Bdz
(46 rows)
drop table phone_book;
drop table phone_book_substr;