Regex for method parsing improved.