У меня есть пример, подобный этому: https://regexr.com/49sdt Как видите, найдено 11 элементов.Теперь я хотел бы разделить их, которые содержат только список элементов начала [Образец .... образец2]
Вы можете проверить мой код здесь: https://repl.it/repls/PriceyNecessaryProfiles Как видите, он имеет 23элементы.
Мой ожидаемый результат такой:
[ 'Sample\n•\tThis is sample 1\n•\tThis is sample 2',
'Sample2\n•\tThis is sample 1\n•\tThis is sample 2',
'Sample3\n•\tThis is sample 1\n•\tThis is sample 2',
'Sample4\n•\tThis is sample 1\n•\tThis is sample 2',
'Sample5\n•\tThis is sample 1\n•\tThis is sample 2',
'Sample6\n•\tThis is sample 1\n•\tThis is sample 2',
'Sample7\n•\tThis is sample 1\n•\tThis is sample 2',
'Sample8\n•\tThis is sample 1\n•\tThis is sample 2',
'Sample9\n•\tThis is sample 1\n•\tThis is sample 2',
'Sample10\n•\tThis is sample 1\n•\tThis is sample 2',
'Sample11\n•\tThis is sample 1\n•\tThis is sample 2' ]
Как я могу решить это?