Regex-based execution of methods