[cspan] Make ‘www’ optional and improve the regex for extracting the id (fixes #2194)