I would like to create a Regular Expression String that counts the number of characters in each line. If it's longer than say 10, 12 or 15 characters it would take the number of characters in the line and divide it by two. Next have it jump to the beginning of the word that starts before the half way point and select the space, then replace it with the "|" character at this spot.
I've tried several things based on what I have found on this SuperUser Site but I'm fairly new to Regular Expressions and sort of clueless as to all the in's and out's to get this working.
Example
STRAIGHT FLUSH BEATS THREE OF A KIND.
I WENT TO HIS HOUSE BUT HE WAS ALREADY DEAD.
Would become.
STRAIGHT FLUSH|BEATS THREE OF A KIND.
I WENT TO HIS HOUSE|BUT HE WAS ALREADY DEAD.
Thanks
Recent Questions...