Shaggot event book – regular expressions

Time:2021-2-8
//Nonzero positive integers 
var num1 = /^+?[1-9][0-9]*$/;

//Positive integer + 0 
var num2 = /^d+$/;

//Positive number 
var num3 = /^d+(?=.{0,1}d+$|$)/;   

//Amount format 
var moneyReg = /(^[1-9]([0-9]+)?(.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9].[0-9]([0-9])?$)/;

Keep updating