Hi Rick, Try the code below. I tested it with few variations seems to be covering all, let me know if you see any difference or you may try changing if you see a missed scenario.
Performance wise I used a string - "This is a 1 re45al big te8xt to be…