Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- W w : w = weeks. W weeks preceded by a leading zero if smaller than 10
- D d : d = days. D days preceded by a leading zero if smaller than 10
- G g : g = Military Hours: G hours preceded by a leading zero if smaller than 10
- H h : h = Civilian Hours: H hours preceded by a leading zero...
- m : m = minutes
- s : s = seconds
- (w|W)(?=b)|(d|D)(?=b)|(h|H|g|G)(?=b)|(m)(?=b)|(s)(?=b)
- (w|W) //match upper or lower W
- (?=b) //positive lookahead only match if not apart of a word boundary
- Format("w Weeks, D days, h:m:s");
- //returns 7 Weeks, 04 days, 10:01:05
- Format("[w] weeks [d] days H:m:s");
- //returns [7] weeks [4] days 10:01:05
- Format("w Weeks D days, h:m:s");
- //returns 7 07eeks 04 4ays, 10:01:05
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement