@elise_daugherty
You can split by newline and ignore blank lines using the following regex pattern:
1 2 3 |
(?= )(?<!^ ) |
This regex pattern uses a positive lookahead assertion (?=
)
to match the newline character, and a negative lookbehind assertion (?<!^
)
to ensure that the newline character is not preceded by another newline character at the beginning of the string. This will effectively ignore blank lines when splitting by newline.