Grfana Variable Query

I have multiple topics details received from prometheus .
I want to setup templating using variables and need to write regex for which I need help .

Data is coming like this . Also I need to identify uniq value in those :slight_smile:

Sample Data: From below query , I want only output as 12345 and 456780 .

AB_CD_EF_GH_12345_IJ_KL_FGDFGHHFGDF_PL
AB_CD_EF_GH_12345_IJ_KL_FGDFGHHFF_PL
AB_CD_EF_GH_12345_IJ_KL_FGDFFGDF_PL
AB_CD_EF_GH_12345_IJ_KL_FGDFGHHFGF_PL
AB_CD_EF_GH_12345_IJ_KL_FGDFGHHFGDF_PLA
AB_CD_EF_GH_IJ_456780_IJ_KL_FGDFGHHGFGDF_PLA
AB_CD_EF_GH_IJ_456780_IJ_KL_FGDFHHFGDF_PLA
AB_CD_EF_GH_IJ_456s80_IJ_KL_FGDFGHHDF_PLA

Thanks