Hi haukex,
Yes, you are right. Then again, required \W will not match at the end of the line. So, (?:\W|$) is closer to an ideal solution, which however is rather hypothetical until a proper set of positive and negative test cases is provided.
In reply to Re^4: Split string using regex on \n or max line length
by flowdy
in thread Split string using regex on \n or max line length
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |