How to use character classes in a Postgres regex select?
SELECT "buildings"."street_name" 
FROM "buildings"  
WHERE (street_name ~ '\m21\D*\M');


Explanation:


\m: beginning of word
21: the string to match
\D*: zero or more non-digit characters
\M: end of word
m21\D*\M: a word that starts with 21 followed by any number of non-digits up to the end of the word


If you wanted to limit the query to only ordinal street names (e.g. "21st") and avoid matching things like "21A", you could instead use \m14(st|nd|rd|th)?\M for the pattern.