Anyway, just sharing it! (If there are better ways to do the same, please share here!)
Code: Select all
String := ""
. "- a - a - a" "`r`n"
. "- a - a - a" "`r`n"
. "- a - a - a" "`r`n"
msgbox, % RegExReplace(String, "s)^((.*?a){0}.*?)a", "$1b")
;s), forces "." to match new lines! (`r`n)
;{0} for first a
;{1} for second a
;{2} for third a
; and so on ...!