Hello
I need to surround parts of the words in specific paragraph in a text file.
Specific as I would only need to do so if in the paragraph there is more than one [,] COMMA and the numbert of COMMA is even.
I would use COMMAs as a delimiter.
If it is possible the commas should:
1 - convert the first COMMA to an open parenthesis
2 - find the next comma add a closed parenthesis
3 - find the next comma add a closed parenthesis and if in the paragraph there are additional commas, add an other open parenthesis.
4 - Move to the next paragraph till the end of the text file.
EXAMPLE
Original text
The girl seems to be very sensible to the lights, the shadows, the fuss and the noise.
The girl seems to be very sensible to the lights ( the shadows ) (the fuss) and the noise.
I need to do this because I am using a text to speech program which will change the voice intonation finding a COMMA.
It sounds quite complex but I still hope someone can give me a hand
Thanks for reading