Imagine I have a string like this:
c x c x A c x c x c B c x c x
And I want to find any "c" character that is between "A" and "B". So in this example I need to get 3 matches.
I know that I can use lookahead and lookbehind tokens. So I used this regex:
(?<=A).*c.*(?=B)
But it gets all the sting between A and B: c x c x c as one result.
And if I remove the .* parts, there will be no match at all.
I made an example here. so you can see the results.