{"id":26,"date":"2026-06-24T22:14:55","date_gmt":"2026-06-24T22:14:55","guid":{"rendered":"https:\/\/toolskit.site\/index.php\/find-replace-text-tool\/"},"modified":"2026-06-24T22:14:55","modified_gmt":"2026-06-24T22:14:55","slug":"find-replace-text-tool","status":"publish","type":"page","link":"https:\/\/toolskit.site\/index.php\/find-replace-text-tool\/","title":{"rendered":"Find &#038; Replace Text Tool"},"content":{"rendered":"<div class=\"hth-single-tool-shell\" style=\"--hth-color:#00e5ff\">\n<div id=\"fr-ultimate-wrapper\">\n<style>#fr-ultimate-wrapper{display:block;font-family:system-ui,'Segoe UI Emoji','Apple Color Emoji','Noto Color Emoji',sans-serif;line-height:1.5;color:#e0e0e0}#fr-ultimate-wrapper *,#fr-ultimate-wrapper *::before,#fr-ultimate-wrapper *::after{box-sizing:border-box;margin:0;padding:0}#fr-ultimate-wrapper .tool-container{width:100%;max-width:900px;margin:20px auto;background:radial-gradient(circle at 30% 20%,#1e1e35,#0a0a18);border:1px solid rgba(0,229,255,0.12);border-radius:44px;padding:35px 30px;box-shadow:0 20px 60px rgba(0,0,0,0.7),0 0 40px rgba(0,229,255,0.05);animation:fr-popIn 0.6s cubic-bezier(0.175,0.885,0.32,1.275)}@keyframes fr-popIn{0%{opacity:0;transform:scale(0.94) translateY(30px)}100%{opacity:1;transform:scale(1) translateY(0)}}#fr-ultimate-wrapper .header{text-align:center;margin-bottom:28px}#fr-ultimate-wrapper .icon{font-size:48px;animation:fr-bounce 2s infinite;line-height:1}@keyframes fr-bounce{0%,100%{transform:translateY(0)}50%{transform:translateY(-10px)}}#fr-ultimate-wrapper h1{font-size:clamp(28px,6vw,40px);font-weight:800;background:linear-gradient(to right,#00e5ff,#ff80ab,#b388ff);-webkit-background-clip:text;-webkit-text-fill-color:transparent!important;background-clip:text;color:transparent;margin:8px 0 6px}#fr-ultimate-wrapper .subtitle{color:#aaa;font-size:15px}#fr-ultimate-wrapper textarea{width:100%;min-height:150px;background:rgba(255,255,255,0.04);border:1px solid rgba(255,255,255,0.08);border-radius:24px;color:#fff;padding:16px;font-size:14px;font-family:inherit;resize:vertical;outline:none;transition:border 0.3s}#fr-ultimate-wrapper textarea:focus{border-color:#7c4dff;box-shadow:0 0 25px rgba(124,77,255,0.2)}#fr-ultimate-wrapper .input-row{display:grid;grid-template-columns:1fr 1fr;gap:15px;margin:18px 0}@media(max-width:600px){#fr-ultimate-wrapper .input-row{grid-template-columns:1fr}}#fr-ultimate-wrapper .input-group{display:flex;flex-direction:column;gap:6px}#fr-ultimate-wrapper .input-group label{font-size:13px;color:#888;text-transform:uppercase;letter-spacing:0.5px;display:flex;align-items:center;gap:6px}#fr-ultimate-wrapper input[type=\"text\"]{width:100%;padding:10px 16px;background:rgba(255,255,255,0.05);border:1px solid rgba(255,255,255,0.1);border-radius:25px;color:#fff;font-size:14px;outline:none;font-family:inherit;transition:border 0.3s}#fr-ultimate-wrapper input[type=\"text\"]:focus{border-color:#7c4dff;box-shadow:0 0 20px rgba(124,77,255,0.15)}#fr-ultimate-wrapper .options-row{display:flex;flex-wrap:wrap;gap:15px;margin:14px 0;align-items:center}#fr-ultimate-wrapper .option-item{display:flex;align-items:center;gap:6px;font-size:13px;color:#ccc}#fr-ultimate-wrapper input[type=\"checkbox\"]{accent-color:#00e5ff;width:16px;height:16px;cursor:pointer}#fr-ultimate-wrapper .btn-group{display:flex;gap:12px;flex-wrap:wrap;margin:16px 0}#fr-ultimate-wrapper button{background:rgba(255,255,255,0.04);border:1px solid rgba(255,255,255,0.12);color:#ddd;padding:10px 20px;border-radius:30px;cursor:pointer;font-size:13px;font-weight:600;display:flex;align-items:center;gap:6px;transition:0.3s;font-family:inherit}#fr-ultimate-wrapper button:hover{background:rgba(124,77,255,0.2);border-color:#7c4dff;transform:translateY(-2px)}#fr-ultimate-wrapper button.primary{background:linear-gradient(135deg,#7c4dff,#00e5ff);border:none;color:#000;font-weight:700}#fr-ultimate-wrapper button.primary:hover{box-shadow:0 8px 20px rgba(0,229,255,0.3)}#fr-ultimate-wrapper .preview-box{background:rgba(255,255,255,0.03);border:1px solid rgba(255,255,255,0.05);border-radius:20px;padding:16px;margin-top:15px;max-height:250px;overflow-y:auto;font-size:14px;line-height:1.6;word-break:break-word;color:#ccc}#fr-ultimate-wrapper .highlight{background:rgba(0,229,255,0.25);padding:2px 0;border-radius:3px;color:#fff;font-weight:600}#fr-ultimate-wrapper .match-info{margin-top:8px;font-size:13px;color:#aaa;text-align:center}@media(max-width:500px){#fr-ultimate-wrapper .tool-container{padding:22px 16px}#fr-ultimate-wrapper button{padding:8px 16px;font-size:12px}}<\/style>\n<div class=\"tool-container\">\n<div class=\"header\">\n<div class=\"icon\">&#x1F50D;<\/div>\n<h1>Find &amp; Replace Text<\/h1>\n<div class=\"subtitle\">Regex \u00b7 Highlight \u00b7 Live Preview \u00b7 Undo \u00b7 Copy<\/div>\n<\/div>\n<p><textarea id=\"frInput\" placeholder=\"Enter your text here...\"><\/textarea><\/p>\n<div class=\"input-row\">\n<div class=\"input-group\"><label>&#x1F50E; Find<\/label><input type=\"text\" id=\"frFind\" placeholder=\"Text or pattern to find...\"><\/div>\n<div class=\"input-group\"><label>&#x270F;&#xFE0F; Replace with<\/label><input type=\"text\" id=\"frReplace\" placeholder=\"Replacement text...\"><\/div>\n<\/div>\n<div class=\"options-row\"><label class=\"option-item\"><input type=\"checkbox\" id=\"frCaseSensitive\"> Case Sensitive<\/label><label class=\"option-item\"><input type=\"checkbox\" id=\"frRegex\"> Use Regex<\/label><label class=\"option-item\"><input type=\"checkbox\" id=\"frReplaceAll\" checked> Replace All<\/label><\/div>\n<div class=\"btn-group\"><button class=\"primary\" id=\"frReplaceBtn\">&#x1F504; Replace<\/button><button id=\"frHighlightBtn\">&#x1F4A1; Highlight Matches<\/button><button id=\"frUndoBtn\">&#x21A9;&#xFE0F; Undo<\/button><button id=\"frCopyBtn\">&#x1F4CB; Copy Result<\/button><button id=\"frDownloadBtn\">&#x1F4BE; Download<\/button><button id=\"frClearBtn\">&#x1F5D1;&#xFE0F; Clear<\/button><\/div>\n<div class=\"preview-box\" id=\"frPreview\"><span style=\"color:#555;\">Live preview will appear here&#8230;<\/span><\/div>\n<div class=\"match-info\" id=\"frMatchInfo\"><\/div>\n<\/div>\n<p><script>(function(){const input=document.getElementById('frInput');const findInput=document.getElementById('frFind');const replaceInput=document.getElementById('frReplace');const caseSensitive=document.getElementById('frCaseSensitive');const regexCheck=document.getElementById('frRegex');const replaceAllCheck=document.getElementById('frReplaceAll');const previewBox=document.getElementById('frPreview');const matchInfo=document.getElementById('frMatchInfo');let lastText='';function escapeRegExp(string){return string.replace(\/[.*+?^${}()|[]]\/g,'$&')}function getMatches(text,find){if(!find)return[];const flags=caseSensitive.checked?'g':'gi';let regex;try{if(regexCheck.checked){regex=new RegExp(find,flags)}else{regex=new RegExp(escapeRegExp(find),flags)}}catch(e){return{error:e.message}}const matches=[...text.matchAll(regex)];return{regex,matches}}function updateHighlight(){const text=input.value;const find=findInput.value;if(!text.trim()){previewBox.innerHTML='<span style=\"color:#555;\">Enter text to see preview...<\/span>';matchInfo.textContent='';return}if(!find){previewBox.innerHTML=escapeHTML(text);matchInfo.textContent='';return}const result=getMatches(text,find);if(result.error){previewBox.innerHTML='<span style=\"color:#ff5252;\">Regex Error: '+result.error+'<\/span>';matchInfo.textContent='';return}const{regex,matches}=result;const count=matches.length;matchInfo.textContent='Found '+count+' match'+(count!==1?'es':'');let lastIndex=0;let html='';for(const match of matches){const start=match.index;const end=start+match[0].length;html+=escapeHTML(text.slice(lastIndex,start));html+='<span class=\"highlight\">'+escapeHTML(match[0])+'<\/span>';lastIndex=end}html+=escapeHTML(text.slice(lastIndex));previewBox.innerHTML=html}function performReplace(){const text=input.value;const find=findInput.value;if(!find){alert('Please enter text to find.');return}lastText=text;const result=getMatches(text,find);if(result.error){alert('Regex Error: '+result.error);return}const{regex}=result;const replace=replaceInput.value;let newText;if(replaceAllCheck.checked){newText=text.replace(regex,replace)}else{newText=text.replace(regex,replace)}input.value=newText;updateHighlight()}function undoReplace(){if(lastText){input.value=lastText;lastText='';updateHighlight()}else{alert('Nothing to undo.')}}function escapeHTML(str){return str.replace(\/&\/g,'&amp;').replace(\/<\/g,'&lt;').replace(\/>\/g,'&gt;')}input.addEventListener('input',updateHighlight);findInput.addEventListener('input',updateHighlight);caseSensitive.addEventListener('change',updateHighlight);regexCheck.addEventListener('change',updateHighlight);document.getElementById('frReplaceBtn').addEventListener('click',performReplace);document.getElementById('frHighlightBtn').addEventListener('click',updateHighlight);document.getElementById('frUndoBtn').addEventListener('click',undoReplace);document.getElementById('frCopyBtn').addEventListener('click',()=>{const text=input.value;if(!text.trim())return;navigator.clipboard.writeText(text).then(()=>{const btn=document.getElementById('frCopyBtn');btn.textContent='u2705 Copied!';setTimeout(()=>btn.textContent='u{1F4CB} Copy Result',1500)})});document.getElementById('frDownloadBtn').addEventListener('click',()=>{const text=input.value;if(!text.trim())return;const blob=new Blob([text],{type:'text\/plain'});const a=document.createElement('a');a.href=URL.createObjectURL(blob);a.download='replaced-text.txt';a.click();URL.revokeObjectURL(a.href)});document.getElementById('frClearBtn').addEventListener('click',()=>{input.value='';findInput.value='';replaceInput.value='';lastText='';updateHighlight()});input.value='Hello world! This is a test text. World is big.';findInput.value='world';updateHighlight()})();<\/script><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Advanced find and replace with regex, case sensitivity, live highlight preview, undo, copy, download, and match counter.<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-26","page","type-page","status-publish"],"_links":{"self":[{"href":"https:\/\/toolskit.site\/index.php\/wp-json\/wp\/v2\/pages\/26","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/toolskit.site\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/toolskit.site\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/toolskit.site\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/toolskit.site\/index.php\/wp-json\/wp\/v2\/comments?post=26"}],"version-history":[{"count":0,"href":"https:\/\/toolskit.site\/index.php\/wp-json\/wp\/v2\/pages\/26\/revisions"}],"wp:attachment":[{"href":"https:\/\/toolskit.site\/index.php\/wp-json\/wp\/v2\/media?parent=26"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}