Skip to content

Instantly share code, notes, and snippets.

@hotoo
Created January 5, 2011 09:18
Show Gist options
  • Select an option

  • Save hotoo/766084 to your computer and use it in GitHub Desktop.

Select an option

Save hotoo/766084 to your computer and use it in GitHub Desktop.
var RE_ORACLE = /^jdbc:oracle:thin:@([^:]+)(?::([0-9]+))?:([a-zA-Z][a-zA-Z0-9]*)$/,
RE_MYSQL = /^jdbc:mysql:\/\/([^:\/]+)(?::([0-9]+))?\/([a-zA-Z][a-zA-Z0-9]*)$/;
var oracle = "jdbc:oracle:thin:@10.253.102.122:1521:dg01";
var mysql = "jdbc:mysql://10.253.102.122:1521/dg01";
var m = oracle.match(RE_ORACLE);
document.write(m + "<br />");
var n = mysql.match(RE_MYSQL);
document.write(n);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment