i have those strings
hello,world,1.fin
hello,world,start11.fin
hello,world,start11,then,end22.fin
hello,world,111,then,222,then,end333.fin
hello,world,111,then,222,then,end333threes.fin
hello,world,111,then,222,then,end333threes.fin444
and i need to match the endings numbers only before the . and after world, and i expect to get
1
11
22
333
333
333
i tried this but it does not match the last case ,world,.*?(\d+)\. link then i tried this but it only get from begin ,world,.*?(\d+).*\. link
.fin is not static and it does change randomly to .fin444 or .444
This should work
,world,.*?(\d+)[^\d]*\.
See https://regex101.com/r/ilIsJb/1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With