I am trying to figure out meaning of this regular expression:
.{0,70}(?:\\S(?:-| |$)|$)
I understood the meaning of this expression using regexper.
What I understood:
1) 1 to 70 characters except new line
2) then there can be end of line (at the end of the expression we have "|$)") OR
3) in non capturing group second alternative is "\S(?:-| |$)". It says it can not be non-whitespace characters "-" or SPACE or "end os line".
My understanding might be incorrect. I am not able to find out how does it work. Can you please explain me with some test data examples?