Advertisement
Guest User

Untitled

a guest
Oct 4th, 2015
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. W w : w = weeks. W weeks preceded by a leading zero if smaller than 10
  2. D d : d = days. D days preceded by a leading zero if smaller than 10
  3. G g : g = Military Hours: G hours preceded by a leading zero if smaller than 10
  4. H h : h = Civilian Hours: H hours preceded by a leading zero...
  5. m : m = minutes
  6. s : s = seconds
  7.  
  8. (w|W)(?=b)|(d|D)(?=b)|(h|H|g|G)(?=b)|(m)(?=b)|(s)(?=b)
  9.  
  10. (w|W) //match upper or lower W
  11. (?=b) //positive lookahead only match if not apart of a word boundary
  12.  
  13. Format("w Weeks, D days, h:m:s");
  14. //returns 7 Weeks, 04 days, 10:01:05
  15. Format("[w] weeks [d] days H:m:s");
  16. //returns [7] weeks [4] days 10:01:05
  17. Format("w Weeks D days, h:m:s");
  18. //returns 7 07eeks 04 4ays, 10:01:05
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement