splitAndStripLines

emlib.textlib.splitAndStripLines(text, regexp=None)[source]

Splits text into lines and removes empty lines at the beginning and end

Returns the split lines in between

Parameters:
  • text (str) – the text to split

  • regexp (Optional[str]) – if given, use this regexp to split the lines. Otherwise uses str.splitlines

Return type:

list[str]

Returns:

the list of lines