I am having some issues in understanding how to use lookbehind in regex. I need to match all between the first preceding occurrence of myMethod and somethingelse
Example https://regex101.com/r/lF8yT0/4
public myMethod
do something
private myMethod
do somethingelse
(?s)(?<=(myMethod){1})(.*)somethingelse
Selects all from the top, while I only expect
private myMethod
do somethingelse