Skip to content

Instantly share code, notes, and snippets.

@coquin
Created October 31, 2012 12:16
Show Gist options
  • Select an option

  • Save coquin/3986727 to your computer and use it in GitHub Desktop.

Select an option

Save coquin/3986727 to your computer and use it in GitHub Desktop.
A regular expression to match BSON ObjectID
var objectIdRegEx = /^([^\/]+)\/(.*?)\/([^\/]+)\/([0-9a-f]{24})$/;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment