Regular Expressions --> Strings and Arrays

Input


Sample code
function checkRE() {
	out.innerHTML =area.value;
    if (area.value) {
        const exp = new RegExp(/"[a-z]*"/,'g');
        const str = "$&";
        values = area.value.replace(exp, str);
		
		const exparr = new RegExp(/\[[\S ]*\]/,'g');
        const strarr = "$&";
        values = values.replace(exparr, strarr).split("\n").join("
"); out.innerHTML = values; } sample.innerText = checkRE.toString(); title.innerText = document.title; }