/ Published in: jQuery
Simple splitting of a string, just change [0] to [1] if you want to get the text after the ";#" you can change that too.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function getID(value) { returnvalue = value.split(/;#/)[0]; return returnvalue; } var text = '1;#Athene'; var abc = getID(text); console.log(abc);