JSFiddle - React, Tailwind, and code Playground

by Jim_Toth

HTML

<span>test</span>

JavaScript

var num = 16,
    str = 'foo2.net/index2.php?page=15',
    n = str.replace(/=\d+/,'='+num);

$('span').html(n);