I would like to be able to return all canadian postalcode which can be find in using the following regex(migth have a space like: A0A 0A0 or A0A0A0)
regex [A-Z]d[A-Z]s*d[A-Z]d
The problem is when there is more than 1 match that a part of it it in .
I ve played with capturing group (too much) and i m more lost then at the start, oh well.
鉴于图谋: 缩略语
- I would expect the following match
- A0A 0A0 (ok)
- I would expect the following match
鉴于浮雕:SOMETEXTB1A0A0OTHERSTUFFB2A 0B0OTHER
- I would expect the following match:
- B1A0A0 (ok)
- A0A0A0 (not found)
- B2A 0B0 (not found)
- I would expect the following match:
这里是我为后格雷斯克的考验。
with barcodes as(
select *
from
(values
( AAAC9B92WLEDH0G5R0Z0|2024-01-01T01:59:39.379-05 )
, ( SOMETEXTJ9H5G0L2J0OTHERSTUFF )
)b(barcode)
)
select *
from barcodes b
left join lateral (
SELECT UNNEST(
REGEXP_MATCHES(
b.barcode
, [A-Z]d[A-Z]s*d[A-Z]d
, g
)
) match
)t on true