Search code examples
regexregex-lookaroundsregex-group

regex with delimiters for getting value


I need to get the value 20 as below:

this is expired time is (second) 20
max time in the system       1048576

My regex must return the value 20.

i have tried as below:

this is expired time is\s+(\d+)

Any help will be greatly appreciated


Solution

  • ^this is expired time is \(second\) (\d+)