I know it may seem basic for someone but I want to transform a string as follows:
Say, I get a result like this:
12 h 34 mn 56 s
I want to turn this string into:
12:34:56 (no spaces at all and use of colon in place of letters)
Would you please tell me how?
I thank you in advance for any solution!
You can use a combination of two commands to remove and replace the text you wish to change...
var str = "12 h 34 mn 56 s";
str = str.split(" h ").join(":");
// repeat similarly for the rest
Brilliant, simple and... working!
Thank you very much, Ned!