Skip to content

Instantly share code, notes, and snippets.

@evandavis
Last active December 10, 2015 06:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save evandavis/4392719 to your computer and use it in GitHub Desktop.
Save evandavis/4392719 to your computer and use it in GitHub Desktop.
Regex Tuesday Challenge solutions
var re = /^(20(0[0-9]|1[0-2])|1[0-9]{3})\/(0[1-9]|1[0-2])\/(0[1-9]|[1-2][0-9]|30)\s([0-1][0-9]|2[0-3]):([0-5][0-9])(:[0-5][0-9])?$/;
''.replace(/(?:^|([^*]))\*([^*].*?[^*]+)\*(?!\*)/ig, "$1<em>$2</em>");
var re = /^\d{1,3}((,|\s)\d{3})*(\.\d+)?$/;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment