come faccio ad estrarre il testo da una situazione del genere:
[tag1]testodaestrarre1[/tag1][tag2]testodaestrarre2[/tag2]

vorrei che ad esempio nella variabile testo1 ci sia "testodaestrarre1" e nella variabile ad ex testo2 ci sia "testodaestrarre2".

come si fa?