Hey all,

I have a program to write where I am supposed to be able to type in an array of char in one textfield and in another textfield, I can type in a "pattern" of something, enclosed in quotation marks, and click a match pattern button, outputting where that pattern was found in the first textfield.

Example:
abcdeee

"abc"

Pattern was found beginning at position 1.

I need to figure out an algorithm for searching through both arrays of char and finding the similar pattern, then outputting where the pattern was found via system.out.println.

Any help would be appreciated. Thanks!

-HawkFlame

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.