Alternatively, you could use the word boundary marker
/(.{1,20})\b/g
In contrast to using \s*, this would prevent individual words from being split across lines, which I guess was the idea behind the space you used...
In reply to Re: regexp question
by almut
in thread regexp question
by tfoertsch
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |