Split text with 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.
    [javascript]
    function getID(value) {
    returnvalue = value.split(/;#/)[0];
    return returnvalue;
    }
    var text = ‘1;#Athene’;
    var abc = getID(text);
    console.log(abc);
    [/javascript]

    Leave a Reply