Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
Java 8

"
(?:(.{1,40})([\s-]|$))|(.{1,40})
"
gm

Description

This splits a text into sequences of max. 40 chars, concatting with a pipe

Submitted by anonymous - a year ago