Reputation: 1111
- Dropbox login fix
- Updated iris viewer
* other aspects are to be improved
+ fix crash on viewing update
? Photos in notes now support copy, cut and paste - By long pressing a photo in a note, you can access the context
menu for copy, cut and paste of the photo. The photo can be pasted to any place in the text of notes.
Do you like the version? Please take the time to leave a review whenever you update the app.
I need to retrieve the sentences with the delimiters (-, *, + and some others that I use below). So looking for output like:
['Dropbox login fix', 'Updated iris viewer', 'other aspects are to be improved', 'fix crash on viewing update', Photos in notes now support copy, cut and paste - By long pressing a photo in a note, you can access the context menu for copy, cut and paste of the photo. The photo can be pasted to any place in the text of notes.']
Using a regex like:
r = re.split(r'(?m)\s*^[-*:;+&.?]+\s*|\.$',txt)
but this also returns the last line, which I don't want. This sort of free text without delimiter may/may not be present in the text I am working with.
Upvotes: 1
Views: 58
Reputation: 786339
Don't use split
for this. Use this regex:
^\s*[-*:;+&.?]+\s*(.+)$
in re.findall()
function to get all your matches.
Upvotes: 2