I have this RegEx which allows people to input max 7 digits before decimal and two after which is optional.
I figure it would be neater to put them into a variable.
I have searched through with people saying use the RegExp object but I am still confused how it's done.
This is what I have with my RegEx.
/^(\d{1,7})(\.\d{2})?$/
 
     
     
     
    