#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?m)\d+\K\."
Local $sString = "1. Wallbaum, H., S. Krank, " & @CRLF & _
"3. Levinson, H.S., Highways, people," & @CRLF & _
"4. Mercier, J., Equity, social justice, " & @CRLF & _
"225. Lemp, J.D., et al., " & @CRLF & _
"17. Chi, G. and B. Stone,"
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