For this example :
input_text = "This is a sentence. [balise]Special Word.[/balise] Another sentence here."
I want to split this string with [balise] as start delimiter & [/balise] as end delimiter, but also i want to keep (if possible) the delimiters with the word between them. I am trying to get the following output :
output_text = ["This is a sentence. " , "[balise]Special Word[/balise]" , "Another sentence here."]
I tried many ways (with regex) without sucess, and didn't found any solutions online. How can i do this operation ?