JSFiddle - React, Tailwind, and code Playground

HTML

<div id="res"></div>

JavaScript

var url = "https://www.somewebsite.com/?a=dr&rid=10";
var tmp = url.match(/rid=(.*)/i);
document.getElementById('res').innerHTML=tmp[1];