How to assert the regular expression against my output using selenium java : This is my regex value

/(\u20AC|\u00A3)[\d,]*/?(week|wk|month|mth|year|yr)?/

Can I please know how to verify this regular expression against my output using selenium.