This works for my use after scraping the internet and forums to put this together:
Code: Select all
F1::
Mystring =
(
Mars soon 3331,00
dgf 0123456
wordy
digit 1234,00
another digit -1234,00
Mars 3334,01
Sun
Univers -4321,00
)
RegExMatch(MyString,"s)Mars first(.*)Sun",Earth)
RegExMatch(MyString,"s)Mars(.*)Sun",Earth)
Earth := RegExReplace(Earth, "\,.*")
Earth := RegExReplace(Earth, "\D")
MsgBox, % Earth
return
In line 19 I could not jump over line 18. How to skip line 18? Cecause first match has another word behind it before a digit exists which I don't want to catch.
And in line 20 I remove decimals first before having the digits I want.
I know all these 4 lines can be 1. But I know that I can not do that myself.
Anyone pros?