XSLT / XPath function to remove trailing characters -
i have situation whereby displaying address in xform, address comes me pre formatted, contains couple of trailing commas, need remove.
here code:
<xf:output id="address-control" ref="$address" > <xf:label>gp address</xf:label> </xf:output>
which, produces output this:
house, road, town, , , , ,
i need strip out trailing commas output becomes:
house, road, town
thanks in advance
using replace($address, '[\s,]+$', '')
should remove trailing mix of white space , commas.
Comments
Post a Comment