#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?<=\d{4}(-\d{2}){2}),\s*"
Local $sString = "L.J. Santodonato, Y. Zhang, M. Feygenson, C.M. Parish, M.C. Gao, R.J. Weber, J.C. Neuefeind, Z. Tang, P.K. Liaw~Deviation from high-entropy configurations in the atomic distributions of a multi-principal-element alloy.~NATURE COMMUNICATIONS~6~2015~~~~0~~0~~2015-11-21, S. Liu, M.C. Gao, P.K. Liaw, Y. Zhang~Microstructures and mechanical properties of AlxCrFeNiTi 0.25 alloys.~JOURNAL OF ALLOYS AND COMPOUNDS~619~2015~610~~~0~~0~~2015-11-22"
Local $sSubst = "\n"
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