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%
Search found 5 matches
- 23 Jul 2018, 09:38
- Forum: Ask for Help (v1)
- Topic: Finding the number between two words in a text - RegEx
- Replies: 6
- Views: 1627
Re: Finding the number between two words in a text - RegEx
- 23 Jul 2018, 09:21
- Forum: Ask for Help (v1)
- Topic: Finding the number between two words in a text - RegEx
- Replies: 6
- Views: 1627
Re: Finding the number between two words in a text - RegEx
If the two word are always the same you could do this "(?<=Test )[^\d.]+(?= hehe)" text := "this 54.8 is a 51 test 88888888888.1 hehe" RegExMatch(text, "(?<=test )[^\d.]+(?= hehe)", output) msgbox, %output% Doesn't work, message box pops up empty. I guess I did something wrong with syntax, can you ...
- 23 Jul 2018, 09:04
- Forum: Ask for Help (v1)
- Topic: Finding the number between two words in a text - RegEx
- Replies: 6
- Views: 1627
Re: Finding the number between two words in a text - RegEx
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%
- 23 Jul 2018, 08:07
- Forum: About This Community
- Topic: Issues with registering, Post your username here...
- Replies: 846
- Views: 2012048
Re: Issues with registering, Post your username here...
Can't post a thing
- 23 Jul 2018, 08:04
- Forum: Ask for Help (v1)
- Topic: Finding the number between two words in a text - RegEx
- Replies: 6
- Views: 1627
Finding the number between two words in a text - RegEx
Code: Select all
text := "this 54.8 is a 51 test 88888888888.1 hehe"
RegExReplace(text, "[\d.]+", output)
msgbox, %output%