Skip to content
Browse files

More duplicate code removal.

  • Loading branch information...
1 parent 73503a8 commit caaa733d8ae50263d590341183a48c44065c27f6 @akavlie committed May 31, 2012
Showing with 0 additions and 26 deletions.
  1. +0 −26 controllers/AnalysisController.js
View
26 controllers/AnalysisController.js
@@ -68,29 +68,3 @@ exports.controller = function (req, res) {
// end /analysis/analyze
}
-
-if (!String.prototype.remove_urls) {
- String.prototype.remove_urls = function () {
- var url_pattern = /\(?\bhttps?:\/\/[-A-Za-z0-9+&@#\/%?=~_()|!:,.;]*[-A-Za-z0-9+&@#\/%=~_()|]/gi;
- return this.replace(url_pattern, "");
- }
-}
-if (!String.prototype.remove_hashtags) {
- String.prototype.remove_hashtags = function () {
- var hash_pattern = /(^|\s)#[-A-Za-z0-9_]+(\s|$)/gi;
- return this.replace(hash_pattern, "$1$2");
- }
-}
-if (!String.prototype.remove_screen_names) {
- String.prototype.remove_screen_names = function () {
- var at_pattern = /(^|\s)@[-A-Za-z0-9_]+(\s|$)/gi;
- return this.replace(at_pattern, "$1$2");
- }
-}
-if (!String.prototype.replace_punctuation) {
- String.prototype.replace_punctuation = function () {
- var alpha_pattern = /[^a-z^A-Z^0-9^-^_]/gi;
- return this.replace(alpha_pattern, " ");
- }
-}
-

0 comments on commit caaa733

Please sign in to comment.
Something went wrong with that request. Please try again.