I want to format this date: 23/05/2013.
23/05/2013
First I want to split the string at the first / and have the res
/
try
date.innerHTML= date.innerHTML.replace(/^(..)\//,'<span>$1</span></br>')
<div id="date">23/05/2013</div>