I have to write a few regexes. I did all except the following. I don’t know how to add something via regex only.
-
Change this
9/28/2005to09.28.2005(Am able to replace slashes with period but how to add leading zero to 9) -
Change
September 21, 2006to21. September 2006(am able to replace,with.but how to change the order?) -
Change
5:00 PMtoi7:00 Uhr(12 to 24 hour)?
1st Case (padding with zero):
2nd Case (change order):
3rd case (12-24 hr)
As JavaScript RegEx engine does not support
If-Then-Else Conditionals. So, it is hard and time-taking job to create apure RegEx patternfor that purpose.Hope this helps.