String.prototype.toCamelCase
JavaScript
String.prototype.toCamelCase = function() {
return this
.toLowerCase()
.replace(/[^\w\s\-]/g, ' ')//remove anything thats not a word character, space or dash
.replace(/[^a-z0-9]/g, ' ')//replace anything else with a space
.replace(/\s(.)/g, function(match,group) {return group.toUpperCase()})
}
var str = "aa_aa_aa";
var hashtag = "#"+(str.toCamelCase())
console.log(hashtag);