basic regex parser (needs update to properly support parenthesis for precedence)