I am using angular UI date picker to get the date. I save the date into a string variable. The problem is that I want the date to be trimmed out in a very specific format. I don't know regex, at all which I think is the right way to do this in javascript? Can somebody tell me the regex that I can write in a function that will trim the input to the specific output using native javascript only. e.g. Input:
Thursday sep 20-2-2015 00:00:00 GMT (+5:00) Pakistan Standard Time.
Output should be:
20-2-2015 00:00:00.
Thanks a lot!