What is the regular expression in powershell for reading the values between "JPEG" and "5."
JPEG_5.10.002.000.txt
JPEG_pnrl_5.10.002.000.txt
JPEG_pnrl_Explorer_5.10.002.000.txt
jpeg_fsrg_5.10.002.000.txt
JPEG_Help_5.10.002.000.txt
JPEG_5.10.002.001.txt
JPEG_pnrl_5.10.002.001.txt
JPEG_Help_5.10.002.001.txt
JPEG_pnrl_Explorer_5.10.002.002.txt
JPEG_fsrg_5.20.002.002.txt
JPEG_Help_5.20.002.002.txt
JPEG_pnrl_5.20.002.003.txt
JPEG_fsrg_5.20.002.003.txt
I used the following regex for getting the value but it is not working.What is the best pattern for getting the value between "JPEG" and "5."
$r = [regex] "[JPEG]+([a-zA-Z]+).*"
$match = $r.match("JPEG_pnrl_Explorer_5.10.002.000.txt")
$text = $match.groups[1].value