Hello ALUG,
I wonder if anyone can help with a regular expression (for text wrapping)?
I need to match all the characters from either the beginning of the line or the last match (in global mode) up to the last space before the Xth character.
I can do the first space after the Xth character:
$ echo "A string with quite a lot of words and spaces in it." | sed "s/(.{,X}) /\1\n/g"
Any ideas?
Richard