var data = `The purpose of a child protective investigation is to assess whether the child[^1] named in a State Central Register of Child Abuse and Maltreatment (SCR) report is abused or maltreated, and to assess safety and risk. When the ACS Division of Child Protection (DCP) receives an SCR report, an investigation or assessment must begin within 24 hours.[^2] While an SCR[^3] report may include multiple safety concerns and involve diverse family dynamics, the Child[^4] Protective Specialist (CPS) must complete all minimum components of an investigation or[^5] CARES/FAR assessment referenced[^6] in this[^7] chapter[^8].`
footerReplace_firstIndx(98);
function footerReplace_firstIndx(startFrom, filedata) {
var matched = data.match(/\[\^(\d*)]/gm)
for (var i = 0; i < matched.length; i++) {
console.log(matched[i], matched[i].replace(/(\[\^)\d*(])/gm, "[^" + startFrom++ + "]"))
}
console.log()
}
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.