Find String and extract with next String

Based on exactly what you said:-

> "Selig Court, Flat 62, Beverley Gardens, London".match(/(Flat \d{1,4})/)[0]
'Flat 62'
> "Flat 62, Selig Court, Beverley Gardens, London".match(/(Flat \d{1,4})/)[0]
'Flat 62'

Leave a Comment