Code: Select all
text := "this 54.8 is a 51 test 88888888888.1 hehe"
RegExReplace(text, "[\d.]+", output)
msgbox, %output%
Code: Select all
text := "this 54.8 is a 51 test 88888888888.1 hehe"
RegExReplace(text, "[\d.]+", output)
msgbox, %output%
Code: Select all
#SingleInstance, Force
text := "this 54.8 is a 51 test 88888888888.1 hehe"
output := RegExReplace(text, "[^\d.]+", " ")
msgbox, %output%
Wow it's awesome thank you but I don't need all of them, I just need to get 88888888888.1 from it. Since it's between two words.Rohwedder wrote:Hallo,
do you want this?:Code: Select all
#SingleInstance, Force text := "this 54.8 is a 51 test 88888888888.1 hehe" output := RegExReplace(text, "[^\d.]+", " ") msgbox, %output%
MannyKSoSo wrote:If the two word are always the same you could do this "(?<=Test )[^\d.]+(?= hehe)"
Code: Select all
text := "this 54.8 is a 51 test 88888888888.1 hehe"
RegExMatch(text, "(?<=test )[^\d.]+(?= hehe)", output)
msgbox, %output%
Oh got it, it works. Thanks a lot. Problem solved.MannyKSoSo wrote:Code: Select all
text := "this 54.8 is a 51 test 88888888888.1 hehe" RegExMatch(text, "(?<=test\s)\d+\.?\d+?", output) msgbox, %output%