Relative Content

Tag Archive for regexwhitespacestring-length

regexp multiple matches by whitespace and length

I would like to split inbound string
"A title is one or more words used before or after a person's name."
to multiple strings by rule: max string length is 15 chars, and string should has whitespace or end of line at the end.
So there is expected result:
"A title is one ",
"or more words ",
"used before or ",
"after a ",
"person's name.".