180
rated 0 times
[
184]
[
4]
/ answers: 1 / hits: 16719
/ 12 Years ago, wed, january 9, 2013, 12:00:00
I am attempting to implement an auto-formatter in JS
, such that if I have a given value (e.g. 12345678) and I have a given format (e.g. XX.XX.XX
OR XX-XX-XX
OR XX/XX/XX
OR XXX-XXXX
), I can auto-format my initial value to any of the given formats.
The required format will vary, so it needs to be able to take any given format and reformat the original value to match.
I have no idea if its possible or how to go about it. Any help appreciated.
Thanks,
Clara
More From » regex