<!-- BEGIN [% component.name %] -->
[%-
re = '\*\*';
IF ( item = nhs_number.match('(\d{3})(\d{3})(\d{4})') );
item.join; # defaults to single space
ELSIF nhs_number.match(re); nhs_number; # anonymised
ELSE;
'NULL'; # can't return empty - length() gets HTML comments at top & bottom
END;
-%]
<!-- END [% component.name %] -->