I am trying to match all statements which contain the following two words
ALPHA and BETA
The regex that I used is
(?=.*ALPHA)(?=.*BETA)
I understand this means looking ahead any character for any number occurences check if ALPHA and BETA are present in the given string.
Can someone tell me if there will be any consequence if change the above code to the following.
(?=.*?ALPHA)(?=.*?BETA)
What would this additional question mark do?
My input string would be something like "ALPHA|checkagainst|(BETA_val)". The regex I wrote should return true for this above input as both words ALPHA and BETA are present