Moved regular expression matching to ModelicaRes