Add optional trailing numeric group to regex in getRootUrl util

Signed-off-by: Don Naegely <naegelyd@gmail.com>