Hello,

I'm new to C language and I'm struggling quite a bit.

I'm trying to play around with patterns. So far, I managed to print out the amount of substrings between a certain pattern, for example if my input is "hi", my output would be 1.

When my input is"hi there", it would be 2. And when my input is "hi!there", it would also be 2. I would have 3 as an output when my input is this: "hi__there__girl"

Now, I want to change it that it prints the last whole substring after a pattern.
So if my input is "hi::there", I want my output to be "there" (instead of the number 2), or when my input is "hi__there__girl" I want the output to be "girl".

Input always is just one long series of letters, numbers and patterns.

I don't know how to do that - I manage only to count the substrings between the patterns, but I don't know how to find and print the last suffix after a pattern.

Could anyone help me please?