lastとの間の値に一致する正規表現を探しています\
_
例:
入力:\\\ezbe.local\folder1\folder2\folder3\33248a-48596-a54qsd-4d7d98_2
出力:33248a-48596-a54qsd-4d7d98
それは
[^\\]*(?=_[^\\]*$)
説明:
[^\\]* # Match any number of non-backslash characters
(?= # if the following is true after the matched text:
_ # There is a _
[^\\]* # followed only by non-backslash characters
$ # until the end of the string.
) # End of lookahead assertion