I am given a string which is of this pattern:
[blah blah blah] [more blah] some text
I want to split the string into three parts: blah blah blah
, more blah
and some text
.
A crude way to do it is to use mystr.split('] ')
, and then removes the lead [
from the first two elements. Is there a better and performant way (need to do this for thousands of strings very quickly).