Since it's JS I assume that you can either access the cols= value of the textarea or you can set it manually in the textarea, in either case you could then do something like:
HTML: <textarea cols=10 rows=7></textarea>
Pattern (need to enclose properly for JS etc., but this should be the general syntax): [\S\s]{10}|[\S\s]+
Source = "12345678901234567890123456789012"
Matches(0) = "1234567890"
Matches(1) = "1234567890"
Matches(2) = "1234567890"
Matches(3) = "12"
Note that if you use this method you might get unexpected results when the user actually enters a \n\r by issuing a return in the textarea, if but you could also match on \n\r:
\n\r|[\S\s]{10}|[\S\s]+
Source = "12345678
901234567890123456789012"
Matches(0) = "12345678
"
Matches(1) = "9012345678"
Matches(2) = "9012345678"
Matches(3) = "9012"
Using a non-monospaced font might cause problems for the regex if you match your cols= value of your textarea in your pattern, you may need to manually test with the font you use in the textarea to confirm the number of characters per line to use in the {} within the regex pattern. For example, even if you use cols=10 you might only fit 7 characters on each line, so you would use {7} instead of {10}.