javascript - js regular replacement date format problem
阿神
阿神 2017-07-05 11:05:19
0
1
936
'2017-6-5'.replace(/-(\d{1})$|-/g,'0'),返回为什么是20170605,少了"-",我要的结果是2017-06-05
阿神
阿神

闭关修行中......

reply all(1)
为情所困

'2017-6-5'.replace(/-(d{1})/g,'-0$1') Try writing it like this.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template