Q:

RegEx match the first occurance of a word, from a list of desired words

I seem to have hit upon a corner case - or it's so easy, no one has ever asked! 
I have a list of desired words I'd like to match in a block of text. However, I only want to match the first occurrence of each of these, (edit: if they exist in the target block).
If my block of text reads:
glass shoes door doors window door glasses. glass's glass window windows glasses

I'd like to match:
glass door window

I'm learning how to narrow it down as I try to understand the groupings... This:
/(?:[\s]|^)door|glass|window(?=[\s]|$)/g;
gives me "ghost" occurrences:
glass, door, door,window, door,glass,glass,glass,window,glass

Wrapping my desired words in brackets as a set (group?) like this:
/(?:[\s]|^)(door|glass|window)(?=[\s]|$)/g;

gives me only every actual occurrence:
glass, door, window, door, glass, window

which is so far the best (narrowest) I can get. 
I would have expected that:
/(door|glass|window)/

without the /g global flag would give me the first occurrence of "my" OR "desired" OR "words", but it stops at the first find, "glass".
So to restate the question, (edited) I'm trying to find the first instance of each of these words (first door, and first window, and first glass), if they show up at all, wrapped by (?:[\s]|^) and (?=[\s]|$), in a block of text.
Many thanks!

A:

Out of order matching
( For more advanced out of order matching see:
this and 
this
)
This can easily be done in a single match.
You could do this if you have a small, fixed amount of words to match.  
This requires all the words be there.
(With a slight modification, each word can be optional)
^(?=.*?(door))(?=.*?(glass))(?=.*?(window)) 
Expanded   
 ^
 (?=
      .*? 
      ( door )                      # (1)
 )
 (?=
      .*? 
      ( glass )                     # (2)
 )
 (?=
      .*? 
      ( window )                    # (3)
 )

Output  
 **  Grp 0 -  ( pos 0 , len 0 )  EMPTY 
 **  Grp 1 -  ( pos 12 , len 4 ) 
door  
 **  Grp 2 -  ( pos 0 , len 5 ) 
glass  
 **  Grp 3 -  ( pos 23 , len 6 ) 
window  

Additional - Make items optional
The tweak to make items optional:  
^(?=.*?(?:door|window|glass))(?=.*?(door))?(?=.*?(glass))?(?=.*?(window))? 
Expanded  
 ^ 
 (?=                   # Prevent matching nothing.
      .*? 
      (?: door | window | glass )  # At least one should exist
 )
 (?=
      .*? 
      ( door )              # (1), Optiional first door
 )?
 (?=
      .*? 
      ( glass )             # (2), Optiional first glass
 )?
 (?=
      .*? 
      ( window )            # (3), Optiional first window
 )?

