Take this regular expression: /^[^abc]/. This will match any single character at the beginning of a string, except a, b, or c.
/^[^abc]/
If you add a *
*
On python:
.+?(?=abc) works for the single line case.
.+?(?=abc)
[^]+?(?=abc) does not work, since python doesn't recognize [^] as valid regex. To make multiline matching work, you'll need to use the re.DOTALL option, for example:
[^]+?(?=abc)
re.findall('.+?(?=abc)', data, re.DOTALL)