Code: Select all
alltext=
(
adfdsff
efresfsdf
AAA:randomwords
EFDFDF
)
out:=RegExReplace(alltext,"m).*\nAAA:(.*)\n.*","$1")
MsgBox,% out
But then when I try to use this into reality, grabbing some multi-line paragraph else where, it does not work.
I tried different things: \n, \r, sm), $.......most cases it removes nothing leaving me whole paragraph, other cases it leaves me "randomwords" and next line. I can not tell if my regex usage is wrong or it's because I don't know how to identify what kind of line return is used in real life.
Then I tried regex lazy:
Code: Select all
out:=RegExReplace(alltext,"m).*AAA:(.*?)$.*","$1")
Any idea? Please help.