JSFiddle - React, Tailwind, and code Playground

JavaScript

$(document).ready(function () {
    //var href = location.href; // get the url
    var href = "www.bla.com#myhashtag="21215454uhuyhuhu"; // example url
    var split = href.split("#"); // split the string; usually there'll be only one # in an url so there'll be only two parts after the splitting
    var afterSplit = "Error parsing url";
    if (split[1] != null) {
        afterSplit = split[1];
    }
    // If everything went well shows split[1], if not then de default error message is shown
    alert(afterSplit);
});