A Java-based application that demonstrates the Brute Force and Horspool string matching algorithms in a user-friendly graphical interface. This tool allows users to load a text file, search for a specified pattern, and replace it with a new string. The GUI application is built using Java Swing, and it provides a detailed view of the matching process step-by-step.
- File Loading: Load a text file for pattern searching and replacement.
- Pattern Searching:
- Brute Force Algorithm: Implements the basic brute-force approach to find occurrences of a pattern in the text.
- Horspool Algorithm: Utilizes the optimized Horspool algorithm to improve search efficiency, especially on large texts.
- Pattern Replacement: Replaces all occurrences of a specified pattern with a new string and saves the updated content back to the file.
- Process Display: Shows step-by-step details of the matching and replacement processes, including intermediate steps and substring comparisons.
- Java Development Kit (JDK): Version 8 or higher is required to compile and run this application.
- IDE: (Optional) Recommended to use an IDE like IntelliJ IDEA, Eclipse, or NetBeans for running and testing the application.