You can assume that this is a sub procedure where the $Input will change each time, this is just a sample case.

 Code:
$input = "Site-Loc-A-Type"

Function Decide($Input)
 $Array = Split($Input,"-")
   If $Array[2] = "A"
    Do stuff
   Else
    Do other stuff
   EndIf
EndFunction


Or do I misunderstand your question?
_________________________
Today is the tomorrow you worried about yesterday.