{"id":23060786,"url":"https://github.com/syncfusionexamples/java-word-find-and-replace-examples","last_synced_at":"2025-10-12T13:23:30.687Z","repository":{"id":48480938,"uuid":"356234313","full_name":"SyncfusionExamples/Java-Word-Find-and-Replace-Examples","owner":"SyncfusionExamples","description":"Find and replace text in a Word document in Java without Microsoft Word or interop dependencies.","archived":false,"fork":false,"pushed_at":"2024-12-03T10:28:48.000Z","size":520,"stargazers_count":9,"open_issues_count":1,"forks_count":4,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-10-12T13:23:29.887Z","etag":null,"topics":["find-and-replace","java","word-library"],"latest_commit_sha":null,"homepage":"https://www.syncfusion.com/word-framework/java/word-library","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SyncfusionExamples.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-04-09T10:41:43.000Z","updated_at":"2024-12-03T10:28:48.000Z","dependencies_parsed_at":"2023-02-13T20:20:40.636Z","dependency_job_id":"7d5423b7-5172-41a9-bf65-1420d67b3e9e","html_url":"https://github.com/SyncfusionExamples/Java-Word-Find-and-Replace-Examples","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SyncfusionExamples/Java-Word-Find-and-Replace-Examples","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SyncfusionExamples%2FJava-Word-Find-and-Replace-Examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SyncfusionExamples%2FJava-Word-Find-and-Replace-Examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SyncfusionExamples%2FJava-Word-Find-and-Replace-Examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SyncfusionExamples%2FJava-Word-Find-and-Replace-Examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SyncfusionExamples","download_url":"https://codeload.github.com/SyncfusionExamples/Java-Word-Find-and-Replace-Examples/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SyncfusionExamples%2FJava-Word-Find-and-Replace-Examples/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279011465,"owners_count":26084947,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["find-and-replace","java","word-library"],"created_at":"2024-12-16T03:15:17.503Z","updated_at":"2025-10-12T13:23:30.672Z","avatar_url":"https://github.com/SyncfusionExamples.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Java Word Find and Replace Examples\n\nThis repository contains examples that illustrates how to find and replace text in Word documents programmatically in Java using [Syncfusion’s Java Word library](https://www.syncfusion.com/document-processing/word-framework/java/word-library?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-docio-examples) (Essential\u0026reg; DocIO) without Microsoft Word or Office interop dependencies.\n\n## Find and replace text in Word documents using Java\n\nThe Syncfusion\u0026reg; Java Word library (Essential\u0026reg; DocIO) provides comprehensive APIs to find and replace text in a Word document with any desired text, image, hyperlink, paragraph, table, and part of a document or an entire document. It provides options to find text by matching case and whole words. You can find each occurrence one by one or all the occurrences of a text in the document. It saves your efforts and time by helping you to automate find and replace a pattern of text in a Word document using Regex. It allows you to save the resultant document as Word document (DOCX, WordML), HTML, RTF.\n\n## Jar files\n\nYou can download the jars from the Syncfusion\u0026reg; [maven repository](https://jars.syncfusion.com/?_ga=2.177721445.1332356717.1617771042-23317178.1569844681) to use our artifacts in your projects. It helps you to use the Syncfusion\u0026reg; Java packages without installing Essential Studio\u0026reg; or platform installation to development with Syncfusion\u0026reg; controls.\n\n## Key Features\n\n- [Find and highlight text in Java](findandhighlighttext/) - Find text from a Word document and format or highlight it.\n\n- [Find and replace text in Java](findandreplacetext/) - Find text from a Word document and replace it with another text.\n\n- [Replace text with image in Java](replacetextwithimage/) - Find a placeholder text from a Word document and replace it with any desired image.\n\n- [Replace text with merge field in Java](replacetextwithmergefield/) - Find a pattern of text from a Word document and replace it with merge fields.\n\n- [Replace text with table in Java](replacetextwithtable/) - Find a placeholder text from a Word document and replace it with a table.\n\n- [Replace text with document in Java](replacetextwithdocument/) - Find text from a Word document and replace it with another Word document.\n\n- [Find and replace several paragraphs in Java](findandreplaceseveralparagraphs/) - Find text that extends to several paragraphs in a Word document and replace it with another Word document.\n\n## Screenshots\n\n**Find and highlight text**\n\n\u003cp align=\"center\"\u003e \n\u003cimg src=\"screenshots/Find-and-highlight-text.png\" alt=\"Find text from a Word document and format or highlight it in Java\"/\u003e \n\u003c/p\u003e\n\n**Find and replace text**\n\n\u003cp align=\"center\"\u003e \n\u003cimg src=\"screenshots/Replace-misspelt-word.png\" alt=\"Find a misspelt word from a Word document and replace it with desired word in Java\"/\u003e \n\u003c/p\u003e\n\n**Replace text with table**\n\n\u003cp align=\"center\"\u003e \n\u003cimg src=\"screenshots/Replace-text-with-table.png\" alt=\"Find text from a Word document and replace it with a table in Java\"/\u003e \n\u003c/p\u003e\n\n## Syncfusion\u0026reg; Java Word Library\n\nThe Syncfusion\u0026reg; DocIO is a [Java Word library](https://www.syncfusion.com/document-processing/word-framework/java/word-library?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-docio-examples) allows you to add advanced Word document processing and does not require Microsoft Word application to be installed in the machine. It is a non-UI component that provides a full-fledged document instance model similar to the Microsoft Office COM libraries to iterate with the document elements explicitly and perform necessary manipulation. \n\n\nTake a moment to peruse the [documentation](https://help.syncfusion.com/java-file-formats/word-library/getting-started?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-docio-examples), where you can find basic Word document processing options along with the features like [mail merge](https://help.syncfusion.com/java-file-formats/word-library/working-with-mail-merge?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-docio-examples), [merge](https://help.syncfusion.com/java-file-formats/word-library/working-with-word-document?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-docio-examples#merging-word-documents), [find and replace](https://help.syncfusion.com/java-file-formats/word-library/working-with-find-and-replace?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-docio-examples) text in the Word document, [protect](https://help.syncfusion.com/java-file-formats/word-library/working-with-security?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-docio-examples) the Word documents and most importantly, [RTF](https://help.syncfusion.com/java-file-formats/word-library/rtf?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-docio-examples), [Text](https://help.syncfusion.com/java-file-formats/word-library/text?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-docio-examples), and  [HTML](https://help.syncfusion.com/java-file-formats/word-library/html?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-docio-examples) conversions with code examples.\n\n## Compatible Microsoft Word Versions\n\n*   Microsoft Word 97-2003\n*   Microsoft Word 2007\n*   Microsoft Word 2010\n*   Microsoft Word 2013\n*   Microsoft Word 2016\n*   Microsoft Word 2019\n*   Microsoft 365\n\n## Supported File Formats\n\n*   Creates, reads, and edits popular text file formats like [DOCX](https://help.syncfusion.com/java-file-formats/word-library/word-file-formats?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-docio-examples#word-open-xml-formats-2007--later), [DOTX](https://help.syncfusion.com/java-file-formats/word-library/word-file-formats?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-docio-examples#templates), DOTM, [DOCM](https://help.syncfusion.com/java-file-formats/word-library/word-file-formats?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-docio-examples#macros), [WordML](), [RTF](https://help.syncfusion.com/java-file-formats/word-library/rtf?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-docio-examples), [Text](https://help.syncfusion.com/java-file-formats/word-library/text?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-docio-examples), [HTML](https://help.syncfusion.com/java-file-formats/word-library/html?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-docio-examples).\n*   Converts Word documents also to [RTF](https://help.syncfusion.com/java-file-formats/word-library/rtf?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-docio-examples), [Text](https://help.syncfusion.com/java-file-formats/word-library/text?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-docio-examples), and  [HTML](https://help.syncfusion.com/java-file-formats/word-library/html?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-docio-examples).\n\n## Resources\n\n- **Product page:** [Syncfusion\u0026reg; Java Word Framework](https://www.syncfusion.com/document-processing/word-framework/java?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-docio-examples)\n- **Documentation:** [Find and Replace using Syncfusion\u0026reg; Java Word library](https://help.syncfusion.com/java-file-formats/word-library/working-with-find-and-replace?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-docio-examples)\n\n## Support and feedback\n\nFor any other queries, reach our [Syncfusion\u0026reg; support team](https://support.syncfusion.com/?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-docio-examples) or post the queries through the [community forums](https://www.syncfusion.com/forums?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-docio-examples).\n\nRequest new feature through [Syncfusion\u0026reg; feedback portal](https://www.syncfusion.com/feedback?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-docio-examples).\n\n## License\n\nThis is a commercial product and requires a paid license for possession or use. Syncfusion's licensed software, including this component, is subject to the terms and conditions of [Syncfusion's EULA](https://www.syncfusion.com/license/studio/22.2.5/syncfusion_essential_studio_eula.pdf?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-docio-examples). You can purchase a licnense [here](https://www.syncfusion.com/sales/products?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-docio-examples) or start a free 30-day trial [here](https://www.syncfusion.com/account/manage-trials/start-trials?utm_source=github\u0026utm_medium=listing\u0026utm_campaign=github-docio-examples).\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyncfusionexamples%2Fjava-word-find-and-replace-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsyncfusionexamples%2Fjava-word-find-and-replace-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyncfusionexamples%2Fjava-word-find-and-replace-examples/lists"}