Regular Expressions 101

Community Patterns

Split up text to 40 signs

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