Added support for capture groups