With Python regex, I'm trying to match everything before a pattern (including line breakers), until reach another pattern. This is the Text:
DFGC 2836 -07-0411B
IMUD - DHI211 (MOOYEHBF P/ SHDUF)
C7000039694 (PD MOFIBD PODF BAOJFD)
The code below matches everything before "C700" pattern. I need everything before "C700", BUT limited to "IMUD" (including it). So, the result should be "IMUD - DHI211 (MOOYEHBF P/ SHDUF)"
(?s)^.+?(?=C700\d*(?=\s))
See it in regex101: LINK