I have this regex1 :
(\w+)\n#(\w+)_(\w+)\n(\w+)
That captures the following text1 :
randomtext
#randomteeexxt_randomqlsdfjml
randomagain
But sometimes I have a fourth line in the text2 :
randomtext
#randomteeexxt_randomqlsdfjml
randomagain
stillrandom
So this following regex2 works :
(\w+)\n#(\w+)_(\w+)\n(\w+)\n(\w+)
The regex2 does not match anything of the text1, this is what I want.
The regex1 matches the 3 first lines of the text2, but I don't want it.
I want that the regex1 does not match anything of the text2.