Regex with numbers and letters

Hello,

I want to add a regex function that allows respondents to add any amount of numbers and 2 letters into their answers. Examples would be 1km, 10kg, 1000ml. The function I used is (regex(., ‘^[0-9][a-z]{2}[A-Z]{2}$’) but it does not work. Can someone help me with the correct function please.

Hi @minuri_perera,

Can you try this one:

regex(.,‘^[0-9]{1,}[A-Za-z]{2}$’)

1 Like

Thank you so much. It works perfectly.

2 Likes