Nodejs String Remove removeMascara()

Here you can find the source of removeMascara()

Method Source Code

// Gabriel Malta//w  w w . j a  v  a 2s .c om

String.prototype.removeMascara = function () {
    if (this.valueOf())
        return this.valueOf().replace(/\.|\/|-|_/g, "");

    return "";
}

Related

  1. removeDiacritics()
    String.prototype.removeDiacritics = function() {
        var result = this.replace(/i/g, 'i')
                    .replace(/?/, 'c');
        return result;
    
  2. removeDots()
    String.prototype.removeDots = function() {
      return this.replace(/\./g, '');
    };
    
  3. removeEndLine()
    String.prototype.removeEndLine = function() {
        var tmp = "";
        for(var i = 0, length = this.length; i < length; i++) {
            var c = this.charAt(i);
            if(c != "\n" && c != "\r") {
                tmp += c;
        return tmp;
    ...
    
  4. removeFileExtension()
    String.prototype.removeFileExtension = function()
        var re = /(.*)\.[^.]+$/;
        return re.test(this);
    
  5. removeFromList(c)
    String.prototype.removeFromList=function(c){
      var arr=this.split(c), i=1;
      for(;i<arguments.length;i++) delete arr[arguments[i]-1];
      return arr.filter(function(v){return v!==undefined}).join(c);
    
  6. removeMultipleWhitespaces()
    String.prototype.removeMultipleWhitespaces = function () {
        return this.replace(/\s\s+/g, ' ');
    };
    
  7. removeNonAlphabeticCharacters()
    String.prototype.removeNonAlphabeticCharacters = function() {
        var result = this.replace(/[^a-zA-Z ]/g, '');
        return result;
    
  8. removeNonChars()
    String.prototype.removeNonChars = function(){
      return this.replace(/[^a-zA-Z0-9 -]/gi, "");
    };
    
  9. removeNonWords()
    String.prototype.removeNonWords = function () { 
      return this.replace(/[^\w|\s]/g, '');