this logic checks the regex to see if a star segment is the last segment... is there a better way to determine this?