function referenceToId(reference) {
  return reference.match(/url\(['"]?#([^'"]*)['"]?\)/)[1];
}
Get ID of fragment within current document from its functional IRI reference.
References may use single or double quotes.

@param {string} reference

@return {string}