As for the exits, a regex like this should work okay. ^Obvious Exits: ([\w\[\]\s]+)
But then you would need to remove any instance of "[closed]" (or any other possibilities that don't constitute directions) from the string before storing it in map.prompt.exits. Something like this would strip out anything enclosed in parentheses: map.prompt.exits = string.gsub(matches[2],"(%[%a+%])","")
As for the room name issue, assuming that the room name is always the first instance of text of the specified color (as it sounds like you are using a color trigger to capture room names), I think using a simple check variable would be the easiest way to deal with it. There would be two parts, the first in the color trigger that is trying to capture the room name, and the second would be in the prompt trigger, where you would reset the variable.
In the color trigger:
And then in the prompt trigger: room_found = false
Just make sure that the prompt trigger is located BELOW the color trigger, so that it executes after the color trigger goes over the line with the prompt, and you should be good to go.