Regular expression to extract string between a word and dot followed by strings

Viewed 6

How can we extract string 1074933442 from :
sameword-1074933442.bac-de.prod.domain.google.com. I am looking for 1074933442 as output.

I tried sameword-(.*)\.\w+ but it gives me 1074933442.bac-de.prod.domain.google as output.

Any suggestions?

0 Answers
Related