I have two little questions in terms of RegExReplace.
Code: Select all
MyString := "This forum is {ABC} a very (001) nice place to [xyz999] learn AHK."
MsgBox % RegExReplace(MyString, "U)\(.*\)")
; Result: This forum is {ABC} a very nice place to [xyz999] learn AHK.
; How can I get this result:
; (001)
MyString := "This forum is {ABC} a very (001) nice place to [xyz999] learn AHK."
MsgBox % RegExReplace(MyString, "U)[\(\{\[].*[\)\}\]]")
; Result: "This forum is a very nice place to learn AHK."
; How can I get this result:
; {ABC} (001) [xyz999]