Could you please let me know how does we split a string with multiple delimiters in python and one of the delimited is a text
for example, we have a string 'this is my worksplace.Work restricted.this is a sample text.this is text 2.Work restricted'
I want a split using dot first and then with 'Work restricted'
I did a regular expression using dot and able to get the list, sample below
textforsplit='this is my worksplace.Work restricted.this is a sample text.this is text 2.Work restricted'
testArray=re.split('[.]',textforsplit)
this is working with dot and I am able to get the list as
['this is my worksplace','Work restricted','this is a sample text','this is text2', 'Work restricted']
But I want to filter the results again and need to get a list excluding the 'Work restricted' text, that is the final list should be
['this is my worksplace','this is a sample text, 'this is text 2']
is there anyway I can achieve this using modifications in the regular expression conditions in python
thank you