Some of our Forum Users Like to separate stuff in their forum posts
with:
===========
or
~~~~~~~~~~~~
or
____________
Usually they get carried away and make their lines too long
which gets presented as a LONG word which widens the <table...
column to get wider than the fixed column width. It makes horizontal
scroll bars appear at the bottom of the browser and makes
reading the forum thread a PAIN.
You know you often can't reason with users, so my
solution is to program around 'em.
So, I've put in a couple of Regexp like this to
make the lines break into smaller "word" segments:
regsub -all "~~~~~~~" $responses "~~~~~~~ " responses
regsub -all "=======" $responses "======= " responses
Now I'm stumped with two new long line variations.
I cannot use "+++++" or "*****" because regsub
barfs,
evidentally because these are reserved characters. Even using a
backslash in front of each + or * doesn't work.
So, my
Question: How do I make the Lonnnng lines break with
spaces every 20 characters with + and *.
OR
is there a more
elegant and cool regsub or regexp that would take ANY "word" longer
20 characters and just add a SPACE so that the tables within the
browsers don't freak out?
TIA
-Bob