Each element of this raw data array is parsed by regex
['\r\n\t\t\t\t\t\t',
'Monday, Tuesday, Wednesday, Thursday, Friday, Saturday:',
' 12:00 pm to 03:30 pm & 07:00 pm to 12:00 am\t\t\t\t\t',
'\r\n\t\t\t\t\t\t',
'Sunday:',
' 12:00 pm to 03:30 pm & 07:00 pm to 12:30 am\t\t\t\t\t']
This is my regex (\\r|\\n|\\t)|(?:\D)(\:)
https://regex101.com/r/fV7wI2/1
Please note that I'm trying to match the : after Saturday but not the : in Time formats eg 12:00
Although the above image classifies capturing/non capturing groups properly
on running re.sub("(\\r|\\n|\\t)|(?:\D)(\:)",'',"Monday, Tuesday, Wednesday, Thursday, Friday, Saturday:")
returns
'Monday, Tuesday, Wednesday, Thursday, Friday, Saturda' (missing 'y' after saturday)
instead of
'Monday, Tuesday, Wednesday, Thursday, Friday, Saturday'
why is this so?
