#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?m)’s/\_[0-9]{14}_/\_/’" & @CRLF & _
""
Local $sString = "10.209.85.14_20160831010034_show_run.txt" & @CRLF & _
"10.209.85.17_20160831010057_show_run.txt" & @CRLF & _
"10.209.85.18_20160831010104_show_run.txt" & @CRLF & _
"10.209.85.19_20160831010112_show_run.txt" & @CRLF & _
"10.209.85.20_20160831010001_show_run.txt" & @CRLF & _
"10.209.85.226_20160831010224_show_run.txt" & @CRLF & _
"10.209.85.227_20160831010228_show_run.txt" & @CRLF & _
"10.209.85.228_20160831010303_show_run.txt" & @CRLF & _
"10.217.76.10_20160831010159_show_run.txt" & @CRLF & _
"10.217.76.11_20160831010159_show_run.txt" & @CRLF & _
"10.217.76.12_20160831010206_show_run.txt" & @CRLF & _
"10.217.76.13_20160831010212_show_run.txt" & @CRLF & _
"10.217.76.14_20160831010219_show_run.txt" & @CRLF & _
"10.217.76.7_20160831010119_show_run.txt" & @CRLF & _
"10.217.76.9_20160831010122_show_run.txt" & @CRLF & _
"10.217.77.226_20160831010309_show_run.txt" & @CRLF & _
"10.217.77.227_20160831010342_show_run.txt" & @CRLF & _
"10.217.77.228_20160831010417_show_run.txt" & @CRLF & _
""
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