correct regex removing <ref name"foo" />