I have the following problem:
var previous_state = response.match(simulator.previousStateString+"(.*?),");
if( ! previous_state ) {response.match(simulator.previousStateString+"(.*?) ")};
if( ! previous_state ) {response.match(simulator.previousStateString+"(.*?)#")};
Basically, I am looking for a string between simulator.previousStateString and ',' or ' ' or'#'. Is there the possibility to have a more compact code? I mean, can I put all 3 regex in just one?
Thanks