Hello to all,
I have a multiline string like the following:
ABCDEF
Colore lato A: NO
Colore lato B: Colore lato B (+3,00)
Colore lato C: NO
Stampa lato A: Stampa lato A (+7,00)
Stampa lato B: NO
Stampa lato C: NO
blablabla
blablabla
basically I would like to make these changes:
- Remove all lines starting with ‘Colore’ or ‘Stampa’ and end with ‘NO’
- Remove the part before “:” lines starting with ‘Colore’ or ‘Stampa’
then the result I would like is the following:
ABCDEF
Colore lato B (+3,00)
Stampa lato A (+7,00)
blablabla
blablabla
For various reasons I can not turn it into array and modify it.
I use regular expressions but I have not found the correct one, you have some idea?
Thank you!