regex - A specifc Regular expression in XSLT -
my doubt specific:
whats meaning of regex in xslt:
"replace(concat('1-',replace($contentsep[1],'\.','-')),'-0(\d+)','-$1')"
my '$contentsep[1]' like: '01.01.01'.
my main doubt in meaning of '-0(\d+)' , '-$1'.
replace($contentsep[1],'\.','-')
makes input: 01-01-01
concat('1-', ...)
makes transformed input: 1-01-01-01
finally replace('...', '-0(\d+)','-$1')
making transformed input : 1-1-1-1
. removing 0
before number(\d
).
Comments
Post a Comment