Last active
December 21, 2015 22:29
-
-
Save nufaylr/6375768 to your computer and use it in GitHub Desktop.
JS utilities
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function removeHash(value) | |
{ | |
if(value != undefined) | |
{ | |
if(value.indexOf('#') != -1) | |
{ | |
value = value.split('#'); | |
value = value[1]; | |
return value; | |
} | |
} | |
} | |
function removeTags(string) | |
{ | |
if(string != undefined) | |
{ | |
string = string.replace(/<div>/gi, ""); | |
string = string.replace(/<\/div>/gi, ""); | |
string = string.replace(/<b>/gi, ""); | |
string = string.replace(/<\/b>/gi, ""); | |
return string; | |
} | |
} | |
function removeMultipleHash(value) | |
{ | |
if(value != undefined) | |
{ | |
value = value.replace(/;#/gi, ","); | |
return value; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment