You can insert newline after 44 characters using left() and right() expressions, but what if next line of dialog needs to have newline at a different position, or two newlines?
Here is much easier solution - mark line breaks with some unused symbol, for example "^":
Input set Text to "The quick brown fox jumps over the lazy dog.^The quick brown fox jumps over the lazy dog.^The end."
Then use this code to replace ^ with newlines:
Output set Text to replace(Input.text, "^", newline)