Rule: 1. Start with R ; 2. One or more number ; 3. One space ; 4. Follow with other characters ;
Test case: Input : 'R1 ABC' 'R4 DEF' 'Randwick Acca' 'R11 PPP'
Expect Output : 'R1 ABC' 'R4 DEF' 'R11 PPP'
Regular expression : "R\d{1,} " I use regular expression tester, it works. https://regex-golang.appspot.com/assets/html/index.html?_sm_au_=iHVPMjQb0QjFkMTHfLJ4vK7214sJW
Test query:
WITH tbl AS (select t.column1 mycol from values('R1 ABC'),('R4 DEF'),('Randwick Acca'),('R11 PPP') t) SELECT * FROM tbl WHERE mycol regexp 'R\d{1,} ' ; Return NULL .
Thanks, Bin