python - regex help - delimiters -
- dropbox login fix - updated iris viewer * other aspects improved + fix crash on viewing update ? photos in notes support copy, cut , paste - long pressing photo in note, can access context menu copy, cut , paste of photo. photo can pasted place in text of notes. version? please take time leave review whenever update app.
i need retrieve sentences delimiters (-, *, + , others use below). looking output like:
['dropbox login fix', 'updated iris viewer', 'other aspects improved', 'fix crash on viewing update', photos in notes support copy, cut , paste - long pressing photo in note, can access context menu copy, cut , paste of photo. photo can pasted place in text of notes.']
using regex like:
r = re.split(r'(?m)\s*^[-*:;+&.?]+\s*|\.$',txt)
but returns last line, don't want. sort of free text without delimiter may/may not present in text working with.
don't use split
this. use regex:
^\s*[-*:;+&.?]+\s*(.+)$
in re.findall()
function matches.
Comments
Post a Comment