(?s)BLA(?:(?!BLA).)*?LOOK
Try this. See demo.
Alternatively, use
BLA(?:(?!BLA|LOOK)[\s\S])*LOOK
To be safer.
More Related Contents:
- Searching for IP addresses in a file
- How to understand regular expression with python?
- Escaping regex string
- Fast punctuation removal with pandas
- Python regex matching Unicode properties
- Python: How to match nested parentheses with regex?
- How do you validate a URL with a regular expression in Python?
- python re.sub group: number after \number
- Handling backreferences to capturing groups in re.sub replacement pattern
- Find USA phone numbers in python script
- Capturing group with findall?
- Strip / trim all strings of a dataframe
- Find out how many times a regex matches in a string in Python
- Using BeautifulSoup to find a HTML tag that contains certain text
- How to replace the first occurrence of a regular expression in Python?
- Python regular expressions OR
- Regular Expression to match cross platform newline characters
- matching unicode characters in python regular expressions
- How to do sed like text replace with python?
- Replace a string located between
- Variable-Width Lookbehind Issue in Python
- Python regular expression for HTML parsing
- Remove Sub String by using Python
- How does python and the regex module handle backslashes?
- How to tell if one regular expression matches a subset of another regular expression?
- Python: UserWarning: This pattern has match groups. To actually get the groups, use str.extract
- Generate a String that matches a RegEx in Python [duplicate]
- Using ^ to match beginning of line in Python regex
- How to split long regular expression rules to multiple lines in Python
- Python regular expression not matching