Regex check correct group for --top/bottom

Fixed the --top/bottom issue.