{"id":316,"date":"2025-07-26T12:45:53","date_gmt":"2025-07-26T12:45:53","guid":{"rendered":"https:\/\/vijaypandit.in\/?page_id=316"},"modified":"2025-07-26T13:35:53","modified_gmt":"2025-07-26T13:35:53","slug":"find-and-replace-text","status":"publish","type":"page","link":"https:\/\/vijaypandit.in\/?page_id=316","title":{"rendered":"Find and Replace Text"},"content":{"rendered":"\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <title>Find and Replace Text Tool<\/title>\n    <style>\n        .gp-find-replace-container {\n            max-width: 1200px !important;\n            margin: 20px auto !important;\n            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;\n            color: #000 !important;\n            line-height: 1.6 !important;\n        }\n\n        .gp-find-replace-header {\n            background: #FAF9F5 !important;\n            padding: 40px 30px !important;\n            border-radius: 12px !important;\n            text-align: center !important;\n            margin-bottom: 30px !important;\n            box-shadow: 0 2px 10px rgba(0,0,0,0.05) !important;\n        }\n\n        .gp-find-replace-icon {\n            background: linear-gradient(135deg, #4A90E2, #357ABD) !important;\n            width: 80px !important;\n            height: 80px !important;\n            border-radius: 20px !important;\n            display: flex !important;\n            align-items: center !important;\n            justify-content: center !important;\n            margin: 0 auto 20px !important;\n            box-shadow: 0 8px 25px rgba(74, 144, 226, 0.3) !important;\n        }\n\n        .gp-find-replace-icon span {\n            color: white !important;\n            font-size: 28px !important;\n            font-weight: 900 !important;\n        }\n\n        .gp-find-replace-title {\n            font-size: 2.5em !important;\n            font-weight: 900 !important;\n            color: #000 !important;\n            margin: 0 0 20px 0 !important;\n            text-shadow: 1px 1px 2px rgba(0,0,0,0.1) !important;\n        }\n\n        .gp-find-replace-description {\n            background: #CBCADC !important;\n            border-left: 5px solid #D97757 !important;\n            padding: 20px !important;\n            border-radius: 8px !important;\n            font-weight: 700 !important;\n            color: #000 !important;\n            font-size: 1.1em !important;\n            max-width: 800px !important;\n            margin: 0 auto !important;\n            min-height: 60px !important;\n            display: flex !important;\n            align-items: center !important;\n            justify-content: center !important;\n        }\n\n        .gp-find-replace-main {\n            display: grid !important;\n            grid-template-columns: 1fr 1fr !important;\n            gap: 30px !important;\n            margin-bottom: 30px !important;\n        }\n\n        .gp-find-replace-section {\n            background: #fff !important;\n            border: 2px solid #e1e1e1 !important;\n            border-radius: 12px !important;\n            padding: 25px !important;\n            box-shadow: 0 4px 15px rgba(0,0,0,0.08) !important;\n        }\n\n        .gp-find-replace-section-title {\n            font-weight: 900 !important;\n            color: #000 !important;\n            font-size: 1.3em !important;\n            margin-bottom: 20px !important;\n            display: flex !important;\n            align-items: center !important;\n            gap: 10px !important;\n        }\n\n        .gp-find-replace-section-title::before {\n            content: '' !important;\n            width: 4px !important;\n            height: 20px !important;\n            background: #D97757 !important;\n            border-radius: 2px !important;\n        }\n\n        .gp-find-replace-label {\n            font-weight: 700 !important;\n            color: #000 !important;\n            font-size: 1em !important;\n            margin-bottom: 8px !important;\n            display: block !important;\n        }\n\n        .gp-find-replace-input,\n        .gp-find-replace-textarea {\n            width: 100% !important;\n            padding: 12px 15px !important;\n            border: 2px solid #ddd !important;\n            border-radius: 8px !important;\n            font-family: 'Segoe UI', monospace !important;\n            font-size: 14px !important;\n            background: #fff !important;\n            color: #000 !important;\n            font-weight: 600 !important;\n            box-sizing: border-box !important;\n            transition: border-color 0.2s ease !important;\n            margin-bottom: 15px !important;\n        }\n\n        .gp-find-replace-textarea {\n            height: 200px !important;\n            resize: vertical !important;\n        }\n\n        .gp-find-replace-input:focus,\n        .gp-find-replace-textarea:focus {\n            outline: none !important;\n            border-color: #D97757 !important;\n            box-shadow: 0 0 0 3px rgba(217, 119, 87, 0.1) !important;\n        }\n\n        .gp-find-replace-options {\n            display: flex !important;\n            gap: 15px !important;\n            flex-wrap: wrap !important;\n            margin-bottom: 20px !important;\n        }\n\n        .gp-find-replace-checkbox-group {\n            display: flex !important;\n            align-items: center !important;\n            gap: 8px !important;\n        }\n\n        .gp-find-replace-checkbox {\n            width: 18px !important;\n            height: 18px !important;\n            cursor: pointer !important;\n        }\n\n        .gp-find-replace-checkbox-label {\n            font-weight: 700 !important;\n            color: #000 !important;\n            cursor: pointer !important;\n            font-size: 13px !important;\n        }\n\n        .gp-find-replace-button {\n            background: #000 !important;\n            color: #fff !important;\n            border: none !important;\n            padding: 12px 20px !important;\n            border-radius: 8px !important;\n            font-weight: 700 !important;\n            font-size: 14px !important;\n            cursor: pointer !important;\n            transition: all 0.2s ease !important;\n            margin-right: 10px !important;\n            margin-bottom: 10px !important;\n            text-transform: uppercase !important;\n            letter-spacing: 0.5px !important;\n        }\n\n        .gp-find-replace-button:hover {\n            background: #333 !important;\n            transform: translateY(-1px) !important;\n            box-shadow: 0 4px 12px rgba(0,0,0,0.2) !important;\n        }\n\n        .gp-find-replace-button:active {\n            transform: translateY(0) !important;\n        }\n\n        .gp-find-replace-button:disabled {\n            background: #ccc !important;\n            cursor: not-allowed !important;\n            transform: none !important;\n        }\n\n        .gp-find-replace-stats {\n            background: #f8f8f8 !important;\n            padding: 20px !important;\n            border-radius: 8px !important;\n            margin-bottom: 20px !important;\n            border: 2px solid #e1e1e1 !important;\n        }\n\n        .gp-find-replace-stat-item {\n            display: flex !important;\n            justify-content: space-between !important;\n            margin-bottom: 10px !important;\n            font-weight: 700 !important;\n            color: #000 !important;\n        }\n\n        .gp-find-replace-stat-number {\n            color: #D97757 !important;\n            font-weight: 900 !important;\n        }\n\n        .gp-find-replace-progress {\n            width: 100% !important;\n            height: 6px !important;\n            background: #e9ecef !important;\n            border-radius: 3px !important;\n            margin-bottom: 15px !important;\n            overflow: hidden !important;\n        }\n\n        .gp-find-replace-progress-fill {\n            height: 100% !important;\n            background: #D97757 !important;\n            border-radius: 3px !important;\n            transition: width 0.3s ease !important;\n            width: 0% !important;\n        }\n\n        .gp-find-replace-match-info {\n            display: flex !important;\n            align-items: center !important;\n            gap: 10px !important;\n            margin-bottom: 15px !important;\n            font-weight: 700 !important;\n            color: #000 !important;\n        }\n\n        .gp-find-replace-history {\n            max-height: 150px !important;\n            overflow-y: auto !important;\n            background: #f8f8f8 !important;\n            padding: 15px !important;\n            border-radius: 8px !important;\n            border: 2px solid #e1e1e1 !important;\n        }\n\n        .gp-find-replace-history-item {\n            padding: 8px 12px !important;\n            border: 1px solid #e9ecef !important;\n            border-radius: 6px !important;\n            margin-bottom: 8px !important;\n            font-size: 13px !important;\n            color: #000 !important;\n            font-weight: 700 !important;\n            background: white !important;\n        }\n\n        .gp-find-replace-success {\n            position: fixed !important;\n            top: 20px !important;\n            right: 20px !important;\n            background: #4CAF50 !important;\n            color: #fff !important;\n            padding: 15px 20px !important;\n            border-radius: 8px !important;\n            font-weight: 700 !important;\n            box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;\n            z-index: 10000 !important;\n            transform: translateX(400px) !important;\n            transition: transform 0.3s ease !important;\n        }\n\n        .gp-find-replace-success.show {\n            transform: translateX(0) !important;\n        }\n\n        @media (max-width: 768px) {\n            .gp-find-replace-container {\n                margin: 10px !important;\n            }\n            \n            .gp-find-replace-main {\n                grid-template-columns: 1fr !important;\n                gap: 20px !important;\n            }\n            \n            .gp-find-replace-header {\n                padding: 25px 20px !important;\n            }\n            \n            .gp-find-replace-title {\n                font-size: 2em !important;\n            }\n            \n            .gp-find-replace-textarea {\n                height: 150px !important;\n            }\n            \n            .gp-find-replace-options {\n                flex-direction: column !important;\n                gap: 10px !important;\n            }\n        }\n    <\/style>\n<\/head>\n<body>\n    <div class=\"gp-find-replace-container\">\n        <div class=\"gp-find-replace-header\">\n            <div class=\"gp-find-replace-icon\">\n                <span>F\/R<\/span>\n            <\/div>\n            <h2 class=\"gp-find-replace-title\">Find and Replace Text Tool<\/h2>\n            <div class=\"gp-find-replace-description\" id=\"gp-find-replace-tip\">\n                \ud83d\udca1 Powerful text processing with real-time preview and advanced options. Perfect for bulk text editing!\n            <\/div>\n        <\/div>\n\n        <div class=\"gp-find-replace-main\">\n            <div class=\"gp-find-replace-section\">\n                <h3 class=\"gp-find-replace-section-title\">\ud83d\udcdd Input &#038; Settings<\/h3>\n                \n                <label class=\"gp-find-replace-label\" for=\"gp-find-replace-input\">Original Text<\/label>\n                <textarea \n                    id=\"gp-find-replace-input\" \n                    class=\"gp-find-replace-textarea\"\n                    placeholder=\"Paste or type your text here...\"\n                ><\/textarea>\n\n                <label class=\"gp-find-replace-label\" for=\"gp-find-replace-find\">Find Text<\/label>\n                <input \n                    type=\"text\" \n                    id=\"gp-find-replace-find\" \n                    class=\"gp-find-replace-input\"\n                    placeholder=\"Enter text to find...\"\n                >\n\n                <label class=\"gp-find-replace-label\" for=\"gp-find-replace-replace\">Replace With<\/label>\n                <input \n                    type=\"text\" \n                    id=\"gp-find-replace-replace\" \n                    class=\"gp-find-replace-input\"\n                    placeholder=\"Enter replacement text...\"\n                >\n\n                <div class=\"gp-find-replace-options\">\n                    <div class=\"gp-find-replace-checkbox-group\">\n                        <input type=\"checkbox\" id=\"gp-find-replace-case\" class=\"gp-find-replace-checkbox\">\n                        <label for=\"gp-find-replace-case\" class=\"gp-find-replace-checkbox-label\">Case Sensitive<\/label>\n                    <\/div>\n                    <div class=\"gp-find-replace-checkbox-group\">\n                        <input type=\"checkbox\" id=\"gp-find-replace-whole\" class=\"gp-find-replace-checkbox\">\n                        <label for=\"gp-find-replace-whole\" class=\"gp-find-replace-checkbox-label\">Whole Words<\/label>\n                    <\/div>\n                    <div class=\"gp-find-replace-checkbox-group\">\n                        <input type=\"checkbox\" id=\"gp-find-replace-regex\" class=\"gp-find-replace-checkbox\">\n                        <label for=\"gp-find-replace-regex\" class=\"gp-find-replace-checkbox-label\">Regex Mode<\/label>\n                    <\/div>\n                <\/div>\n            <\/div>\n\n            <div class=\"gp-find-replace-section\">\n                <h3 class=\"gp-find-replace-section-title\">\u2728 Output &#038; Controls<\/h3>\n                \n                <div class=\"gp-find-replace-progress\">\n                    <div class=\"gp-find-replace-progress-fill\" id=\"gp-find-replace-progress\"><\/div>\n                <\/div>\n\n                <div class=\"gp-find-replace-match-info\">\n                    <span id=\"gp-find-replace-counter\">0 matches found<\/span>\n                <\/div>\n\n                <label class=\"gp-find-replace-label\" for=\"gp-find-replace-output\">Processed Text<\/label>\n                <textarea \n                    id=\"gp-find-replace-output\" \n                    class=\"gp-find-replace-textarea\"\n                    readonly\n                    placeholder=\"Processed text will appear here...\"\n                ><\/textarea>\n\n                <button class=\"gp-find-replace-button\" onclick=\"gpFindReplaceAll()\">\ud83d\udd04 Replace All<\/button>\n                <button class=\"gp-find-replace-button\" id=\"gp-find-replace-next\" onclick=\"gpFindReplaceNext()\" disabled>\u27a1\ufe0f Replace Next<\/button>\n                <button class=\"gp-find-replace-button\" onclick=\"gpFindReplacePrev()\" disabled id=\"gp-find-replace-prev\">\u2b05\ufe0f Previous<\/button>\n                <button class=\"gp-find-replace-button\" onclick=\"gpFindReplaceUndo()\">\u21a9\ufe0f Undo<\/button>\n                <button class=\"gp-find-replace-button\" onclick=\"gpFindReplaceCopy()\">\ud83d\udccb Copy<\/button>\n                <button class=\"gp-find-replace-button\" onclick=\"gpFindReplaceDownload()\">\ud83d\udcbe Download<\/button>\n                <button class=\"gp-find-replace-button\" onclick=\"gpFindReplaceClear()\">\ud83d\uddd1\ufe0f Clear<\/button>\n            <\/div>\n        <\/div>\n\n        <div class=\"gp-find-replace-main\">\n            <div class=\"gp-find-replace-section\">\n                <h3 class=\"gp-find-replace-section-title\">\ud83d\udcca Statistics<\/h3>\n                <div class=\"gp-find-replace-stats\">\n                    <div class=\"gp-find-replace-stat-item\">\n                        <span>Matches Found:<\/span>\n                        <span class=\"gp-find-replace-stat-number\" id=\"gp-find-replace-matches\">0<\/span>\n                    <\/div>\n                    <div class=\"gp-find-replace-stat-item\">\n                        <span>Replacements Made:<\/span>\n                        <span class=\"gp-find-replace-stat-number\" id=\"gp-find-replace-replacements\">0<\/span>\n                    <\/div>\n                    <div class=\"gp-find-replace-stat-item\">\n                        <span>Total Characters:<\/span>\n                        <span class=\"gp-find-replace-stat-number\" id=\"gp-find-replace-chars\">0<\/span>\n                    <\/div>\n                    <div class=\"gp-find-replace-stat-item\">\n                        <span>Total Words:<\/span>\n                        <span class=\"gp-find-replace-stat-number\" id=\"gp-find-replace-words\">0<\/span>\n                    <\/div>\n                    <div class=\"gp-find-replace-stat-item\">\n                        <span>Total Lines:<\/span>\n                        <span class=\"gp-find-replace-stat-number\" id=\"gp-find-replace-lines\">0<\/span>\n                    <\/div>\n                <\/div>\n            <\/div>\n\n            <div class=\"gp-find-replace-section\">\n                <h3 class=\"gp-find-replace-section-title\">\ud83d\udcdc Operation History<\/h3>\n                <div class=\"gp-find-replace-history\" id=\"gp-find-replace-history\">\n                    <div class=\"gp-find-replace-history-item\">Ready to start finding and replacing text&#8230;<\/div>\n                <\/div>\n            <\/div>\n        <\/div>\n\n        <div id=\"gp-find-replace-success\" class=\"gp-find-replace-success\">\n            Action completed successfully!\n        <\/div>\n    <\/div>\n\n    <script>\n        \/\/ Educational tips rotation\n        const gpFindReplaceTips = [\n            \"\ud83d\udca1 Powerful text processing with real-time preview and advanced options. Perfect for bulk text editing!\",\n            \"\ud83d\udd0d Use regex mode for advanced pattern matching like \\\\d+ for numbers or \\\\w+ for words!\",\n            \"\u26a1 Enable 'Whole Words' to avoid replacing parts of larger words accidentally!\",\n            \"\ud83c\udfaf Case sensitive mode distinguishes between 'Apple' and 'apple' as different text!\",\n            \"\ud83d\udcdd Perfect for cleaning code, updating documentation, or processing data files!\",\n            \"\ud83d\ude80 Use 'Replace Next' to step through matches one by one for precision editing!\",\n            \"\ud83d\udcbe Download your processed text or copy it directly to clipboard for easy use!\"\n        ];\n\n        let gpFindReplaceTipIndex = 0;\n        let gpFindReplaceMatches = [];\n        let gpFindReplaceCurrentMatch = 0;\n        let gpFindReplaceReplacementCount = 0;\n        let gpFindReplaceUndoStack = [];\n\n        function gpFindReplaceRotateTips() {\n            const tipElement = document.getElementById('gp-find-replace-tip');\n            if (tipElement) {\n                tipElement.style.opacity = '0.5';\n                setTimeout(() => {\n                    gpFindReplaceTipIndex = (gpFindReplaceTipIndex + 1) % gpFindReplaceTips.length;\n                    tipElement.textContent = gpFindReplaceTips[gpFindReplaceTipIndex];\n                    tipElement.style.opacity = '1';\n                }, 200);\n            }\n        }\n\n        \/\/ Start tip rotation\n        setInterval(gpFindReplaceRotateTips, 6000);\n\n        \/\/ Real-time processing\n        document.getElementById('gp-find-replace-input').addEventListener('input', gpFindReplaceProcess);\n        document.getElementById('gp-find-replace-find').addEventListener('input', gpFindReplaceProcess);\n        document.getElementById('gp-find-replace-replace').addEventListener('input', gpFindReplaceProcess);\n        document.getElementById('gp-find-replace-case').addEventListener('change', gpFindReplaceProcess);\n        document.getElementById('gp-find-replace-whole').addEventListener('change', gpFindReplaceProcess);\n        document.getElementById('gp-find-replace-regex').addEventListener('change', gpFindReplaceProcess);\n\n        function gpFindReplaceProcess() {\n            const input = document.getElementById('gp-find-replace-input').value;\n            const findText = document.getElementById('gp-find-replace-find').value;\n            const caseSensitive = document.getElementById('gp-find-replace-case').checked;\n            const wholeWords = document.getElementById('gp-find-replace-whole').checked;\n            const regexMode = document.getElementById('gp-find-replace-regex').checked;\n\n            if (!input || !findText) {\n                document.getElementById('gp-find-replace-output').value = input;\n                gpFindReplaceMatches = [];\n                gpFindReplaceUpdateStats();\n                gpFindReplaceUpdateNavigation();\n                return;\n            }\n\n            try {\n                gpFindReplaceFindMatches(input, findText, caseSensitive, wholeWords, regexMode);\n                document.getElementById('gp-find-replace-output').value = input;\n                gpFindReplaceUpdateStats();\n                gpFindReplaceUpdateNavigation();\n            } catch (error) {\n                gpFindReplaceAddHistory(`Error: ${error.message}`);\n            }\n        }\n\n        function gpFindReplaceFindMatches(text, findText, caseSensitive, wholeWords, regexMode) {\n            gpFindReplaceMatches = [];\n            let flags = 'g';\n            \n            if (!caseSensitive) {\n                flags += 'i';\n            }\n\n            let pattern;\n            if (regexMode) {\n                pattern = new RegExp(findText, flags);\n            } else {\n                let escapedFind = findText.replace(\/[.*+?^${}()|[\\]\\\\]\/g, '\\\\$&');\n                if (wholeWords) {\n                    escapedFind = `\\\\b${escapedFind}\\\\b`;\n                }\n                pattern = new RegExp(escapedFind, flags);\n            }\n\n            let match;\n            while ((match = pattern.exec(text)) !== null) {\n                gpFindReplaceMatches.push({\n                    start: match.index,\n                    end: match.index + match[0].length,\n                    text: match[0]\n                });\n                \n                if (!flags.includes('g')) break;\n            }\n\n            gpFindReplaceCurrentMatch = 0;\n        }\n\n        function gpFindReplaceUpdateNavigation() {\n            const matchCount = gpFindReplaceMatches.length;\n            document.getElementById('gp-find-replace-counter').textContent = `${matchCount} matches found`;\n            \n            document.getElementById('gp-find-replace-prev').disabled = matchCount === 0 || gpFindReplaceCurrentMatch === 0;\n            document.getElementById('gp-find-replace-next').disabled = matchCount === 0;\n\n            const progress = matchCount > 0 ? ((gpFindReplaceCurrentMatch + 1) \/ matchCount) * 100 : 0;\n            document.getElementById('gp-find-replace-progress').style.width = `${progress}%`;\n        }\n\n        function gpFindReplaceAll() {\n            if (gpFindReplaceMatches.length === 0) {\n                gpFindReplaceShowSuccess('No matches to replace!');\n                return;\n            }\n\n            gpFindReplaceSaveToUndo();\n            const replaceValue = document.getElementById('gp-find-replace-replace').value;\n            let text = document.getElementById('gp-find-replace-input').value;\n            \n            for (let i = gpFindReplaceMatches.length - 1; i >= 0; i--) {\n                const match = gpFindReplaceMatches[i];\n                text = text.substring(0, match.start) + replaceValue + text.substring(match.end);\n            }\n\n            document.getElementById('gp-find-replace-input').value = text;\n            document.getElementById('gp-find-replace-output').value = text;\n            gpFindReplaceReplacementCount += gpFindReplaceMatches.length;\n            \n            gpFindReplaceAddHistory(`Replaced all ${gpFindReplaceMatches.length} instances`);\n            gpFindReplaceProcess();\n            gpFindReplaceShowSuccess(`Replaced ${gpFindReplaceMatches.length} matches!`);\n        }\n\n        function gpFindReplaceNext() {\n            if (gpFindReplaceMatches.length === 0 || gpFindReplaceCurrentMatch >= gpFindReplaceMatches.length) {\n                gpFindReplaceShowSuccess('No more matches!');\n                return;\n            }\n\n            gpFindReplaceSaveToUndo();\n            const match = gpFindReplaceMatches[gpFindReplaceCurrentMatch];\n            const replaceValue = document.getElementById('gp-find-replace-replace').value;\n            let text = document.getElementById('gp-find-replace-input').value;\n            \n            text = text.substring(0, match.start) + replaceValue + text.substring(match.end);\n            \n            document.getElementById('gp-find-replace-input').value = text;\n            document.getElementById('gp-find-replace-output').value = text;\n            gpFindReplaceReplacementCount++;\n            \n            gpFindReplaceAddHistory(`Replaced match ${gpFindReplaceCurrentMatch + 1}`);\n            gpFindReplaceProcess();\n            gpFindReplaceShowSuccess('Match replaced!');\n        }\n\n        function gpFindReplacePrev() {\n            if (gpFindReplaceCurrentMatch > 0) {\n                gpFindReplaceCurrentMatch--;\n                gpFindReplaceUpdateNavigation();\n            }\n        }\n\n        function gpFindReplaceSaveToUndo() {\n            gpFindReplaceUndoStack.push({\n                input: document.getElementById('gp-find-replace-input').value,\n                output: document.getElementById('gp-find-replace-output').value,\n                replacementCount: gpFindReplaceReplacementCount\n            });\n            \n            if (gpFindReplaceUndoStack.length > 10) {\n                gpFindReplaceUndoStack.shift();\n            }\n        }\n\n        function gpFindReplaceUndo() {\n            if (gpFindReplaceUndoStack.length === 0) {\n                gpFindReplaceShowSuccess('Nothing to undo!');\n                return;\n            }\n\n            const lastState = gpFindReplaceUndoStack.pop();\n            document.getElementById('gp-find-replace-input').value = lastState.input;\n            document.getElementById('gp-find-replace-output').value = lastState.output;\n            gpFindReplaceReplacementCount = lastState.replacementCount;\n            \n            gpFindReplaceAddHistory('Undid last operation');\n            gpFindReplaceProcess();\n            gpFindReplaceShowSuccess('Action undone!');\n        }\n\n        function gpFindReplaceCopy() {\n            const output = document.getElementById('gp-find-replace-output');\n            const textToCopy = output.value || document.getElementById('gp-find-replace-input').value;\n            \n            if (textToCopy) {\n                navigator.clipboard.writeText(textToCopy).then(() => {\n                    gpFindReplaceAddHistory('Text copied to clipboard');\n                    gpFindReplaceShowSuccess('Copied to clipboard!');\n                });\n            } else {\n                gpFindReplaceShowSuccess('Nothing to copy!');\n            }\n        }\n\n        function gpFindReplaceDownload() {\n            const output = document.getElementById('gp-find-replace-output').value || document.getElementById('gp-find-replace-input').value;\n            \n            if (!output) {\n                gpFindReplaceShowSuccess('Nothing to download!');\n                return;\n            }\n\n            const blob = new Blob([output], { type: 'text\/plain' });\n            const url = URL.createObjectURL(blob);\n            const a = document.createElement('a');\n            a.href = url;\n            a.download = 'find-replace-result.txt';\n            document.body.appendChild(a);\n            a.click();\n            document.body.removeChild(a);\n            URL.revokeObjectURL(url);\n            \n            gpFindReplaceAddHistory('File downloaded');\n            gpFindReplaceShowSuccess('File downloaded!');\n        }\n\n        function gpFindReplaceClear() {\n            document.getElementById('gp-find-replace-input').value = '';\n            document.getElementById('gp-find-replace-output').value = '';\n            document.getElementById('gp-find-replace-find').value = '';\n            document.getElementById('gp-find-replace-replace').value = '';\n            gpFindReplaceMatches = [];\n            gpFindReplaceReplacementCount = 0;\n            gpFindReplaceUndoStack = [];\n            gpFindReplaceCurrentMatch = 0;\n            \n            gpFindReplaceUpdateNavigation();\n            gpFindReplaceUpdateStats();\n            gpFindReplaceAddHistory('All fields cleared');\n            gpFindReplaceShowSuccess('All cleared!');\n        }\n\n        function gpFindReplaceUpdateStats() {\n            const text = document.getElementById('gp-find-replace-input').value;\n            const chars = text.length;\n            const words = text.trim() ? text.trim().split(\/\\s+\/).length : 0;\n            const lines = text ? text.split('\\n').length : 0;\n\n            document.getElementById('gp-find-replace-matches').textContent = gpFindReplaceMatches.length;\n            document.getElementById('gp-find-replace-replacements').textContent = gpFindReplaceReplacementCount;\n            document.getElementById('gp-find-replace-chars').textContent = chars.toLocaleString();\n            document.getElementById('gp-find-replace-words').textContent = words.toLocaleString();\n            document.getElementById('gp-find-replace-lines').textContent = lines.toLocaleString();\n        }\n\n        function gpFindReplaceAddHistory(message) {\n            const timestamp = new Date().toLocaleTimeString();\n            const historyDiv = document.getElementById('gp-find-replace-history');\n            const historyItem = document.createElement('div');\n            historyItem.className = 'gp-find-replace-history-item';\n            historyItem.textContent = `${timestamp}: ${message}`;\n            \n            historyDiv.insertBefore(historyItem, historyDiv.firstChild);\n            \n            if (historyDiv.children.length > 10) {\n                historyDiv.removeChild(historyDiv.lastChild);\n            }\n        }\n\n        function gpFindReplaceShowSuccess(message) {\n            const successDiv = document.getElementById('gp-find-replace-success');\n            successDiv.textContent = message;\n            successDiv.classList.add('show');\n            \n            setTimeout(() => {\n                successDiv.classList.remove('show');\n            }, 3000);\n        }\n\n        \/\/ Initialize stats on page load\n        window.addEventListener('load', () => {\n            gpFindReplaceUpdateStats();\n            gpFindReplaceUpdateNavigation();\n        });\n    <\/script>\n<\/body>\n<\/html>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Find and Replace Text Tool F\/R Find and Replace Text Tool \ud83d\udca1 Powerful text processing with real-time preview and advanced &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"Find and Replace Text\" class=\"read-more button\" href=\"https:\/\/vijaypandit.in\/?page_id=316#more-316\" aria-label=\"More on Find and Replace Text\">Read more<\/a><\/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-316","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/vijaypandit.in\/index.php?rest_route=\/wp\/v2\/pages\/316","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vijaypandit.in\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/vijaypandit.in\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/vijaypandit.in\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vijaypandit.in\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=316"}],"version-history":[{"count":5,"href":"https:\/\/vijaypandit.in\/index.php?rest_route=\/wp\/v2\/pages\/316\/revisions"}],"predecessor-version":[{"id":329,"href":"https:\/\/vijaypandit.in\/index.php?rest_route=\/wp\/v2\/pages\/316\/revisions\/329"}],"wp:attachment":[{"href":"https:\/\/vijaypandit.in\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=316"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}