Code: Select all
String := "ighja111222dafghjasf43421dweqlopd22267891djcxoa"
RegExMatch(String, "\d{5}", m)
MsgBox % m ; Get 11122 , need 43421
Code: Select all
String := "ighja111222dafghjasf43421dweqlopd22267891djcxoa"
RegExMatch(String, "\d{5}", m)
MsgBox % m ; Get 11122 , need 43421
Code: Select all
String := "ighja111222dafghjasf43421dweqlopd22267891djcxoa"
RegExMatch(String, "(?<!\d)\d{5}(?!\d)", m)
MsgBox % m ; Get 11122 , need 43421
Yes its it! Thx!swagfag wrote: ↑22 Apr 2021, 06:12"first sequence of exactly 5 digits, not immediately followed by another digit"Code: Select all
String := "ighja111222dafghjasf43421dweqlopd22267891djcxoa" RegExMatch(String, "(?<!\d)\d{5}(?!\d)", m) MsgBox % m ; Get 11122 , need 43421