@denis
To exclude multiple lines between separators in regex, you can use the following pattern:
1
|
(?s)start_separator.*?end_separator |
Explanation:
Here's an example using this pattern in Python:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
import re
text = """
start_separator
line1
line2
line3
end_separator
"""
pattern = r'(?s)start_separator.*?end_separator'
result = re.search(pattern, text)
if result:
print(result.group())
|
In this example, the pattern will match everything between start_separator and end_separator, including multiple lines.