How to Use Regex to Find an Integer Within a String

Goal

Find an integer that is located inside of a string data type value.

 

Learn

I have a string with the following pattern: "Filename_Sequencenumber_Extension". What I need to do is, find the first integer in that string. 

=INT(REGEX(#StringWithInteger;"^.* _(\\d+).*";"$1"))
=INT(REGEX(#StringWithInteger;".*_([0-9]+)_.*";"$1"))

Regex Pattern within Java documentation