Skip to content

Instantly share code, notes, and snippets.

@jonathanyee
Created October 25, 2013 06:32
Show Gist options
  • Save jonathanyee/7150272 to your computer and use it in GitHub Desktop.
Save jonathanyee/7150272 to your computer and use it in GitHub Desktop.
var text = list[i].text.match(/[a-zA-Z0-9,.<>\\?!@#$%^&*()-=_+ "':;{}\[\]]*/, "");
if (text !== undefined) {
text = text.toString().replace(/[-a-zA-Z0-9@:%_\+.~#?&//=]{2,256}\.[a-z]{2,4}\b(\/[-a-zA-Z0-9@:%_\+.~#?&//=]*)?/gi, "");
} else {
break;
}
text = text.toString().replace(/^\s+|\s+$/g, "");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment