#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "\s(([a-zA-Z]+\-[a-zA-Z]+|[a-zA-Z]+)\.)"
Local $sString = "<p>With consumers becoming more and more health-conscious by the minute, the wearable fitness tracker market is ever-expanding.</p>" & @CRLF & _
"<p>So, to cut through the clutter, we created a lifestyle video series and an interactive kiosk experience at Best Buy, where we were able to inform and educate consumers about Jawbone’s Up products right there at point of sale.</p>" & @CRLF & _
"<p>By arming consumers with the knowledge on how to improve their personal physical fitness, they’re able to make informed decisions with the push of a button. As part of the experience, visually stimulating films helped people easily understand each product’s features and benefits as well as identify which product best fit their needs.</p>" & @CRLF & _
"<p>The lifestyle and product demonstration films within the interactive experience were also used across social media, the Jawbone website, and as TV spots in two countries.</p>" & @CRLF & _
"<div class="image"><a href="http://goldenarm.com/staging/wp-content/uploads/2015/06/UpKiosk.jpg"><img class="aligncenter wp-image-1156 size-large" src="http://goldenarm.com/staging/wp-content/uploads/2015/06/UpKiosk-1024x643.jpg" alt="" width="1024" height="643"></a><img class="aligncenter wp-image-1348 size-large" src="http://goldenarm.com/staging/wp-content/uploads/2015/06/6.-youpush-1600px-1024x576ABC.jpg" alt="" width="1024" height="576"></div>" & @CRLF & _
"<p class="work-page__video_container"><div class="video-embed"><iframe src="https://player.vimeo.com/video/122136552" width="500" height="281" frameborder="0" allowfullscreen="allowfullscreen"></iframe></div><br>" & @CRLF & _
"<div class="video-embed"><iframe src="https://player.vimeo.com/video/122136232" width="500" height="281" frameborder="0" allowfullscreen="allowfullscreen"></iframe></div></p>" & @CRLF & _
"<div class="image"><a style="font-size: 20px;" href="http://goldenarm.com/staging/wp-content/uploads/2015/06/Screen-Shot-2015-06-23-at-2.55.39-PM.png"><img class="alignnone size-full wp-image-857" src="http://goldenarm.com/staging/wp-content/uploads/2015/06/Screen-Shot-2015-06-23-at-2.55.39-PM.png" alt="Screen Shot 2015-06-23 at 2.55.39 PM" width="639" height="638"></a></div>"
Local $sSubst = " $1"
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