#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?<=\w)\n(?=\w)"
Local $sString = "Quality risk management. A systematic process for the assessment, control," & @CRLF & _
"communication and review of risks to quality across the lifecycle. (ICH Q9)" & @CRLF & _
"" & @CRLF & _
"Simulated agents. A material that closely approximates the physical and, where" & @CRLF & _
"practical, the chemical characteristics, e.g. viscosity, particle size, pH etc., of the product" & @CRLF & _
"under validation." & @CRLF & _
"" & @CRLF & _
"State of control. A condition in which the set of controls consistently provides assurance" & @CRLF & _
"of acceptable process performance and product quality." & @CRLF & _
"" & @CRLF & _
"Traditional approach. A product development approach where set points and operating" & @CRLF & _
"ranges for process parameters are defined to ensure reproducibility." & @CRLF & _
"" & @CRLF & _
"Worst Case. A condition or set of conditions encompassing upper and lower processing" & @CRLF & _
"limits and circumstances, within standard operating procedures, which pose the greatest" & @CRLF & _
"chance of product or process failure when compared to ideal conditions. Such conditions" & @CRLF & _
"do not necessarily induce product or process failure." & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"User requirements Specification (URS). The set of owner, user and engineering" & @CRLF & _
"requirements necessary and sufficient to create a feasible design meeting the intended" & @CRLF & _
"purpose of the system."
Local $sSubst = " "
Local $sResult = StringRegExpReplace($sString, $sRegex, $sSubst)
MsgBox($MB_SYSTEMMODAL, "Result", $sResult)
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for AutoIt, please visit: https://www.autoitscript.com/autoit3/docs/functions/StringRegExp.htm