How does one modify the attached script to check for

Hi,

How does one modify the attached script to check for the highlighted regular expression?

Thanks