I would like to add a conditional statement to my script based on the type of instruments. Is there a way to determine whether a symbol (e.g. SPY, .SPY211119C464, /ES, $TICK) is a stock, an option, a futures contract, or an indicator? Something equivalent to regular expression in unix would be helpful. Thank you.