How the regular expression verifies the type length multiplied by width, which only supports the length multiplication width of two places after the decimal point.

clipboard.png

Mar.29,2021

/ ^\ d + (?:\.\ d {1 answer 2})?\ *\ d + (?::\.\ d {1 answer 2})? $/ try



const regex = /^([1-9]\d*\.\d{2}|0\.\d[1-9])\*([1-9]\d*\.\d{2}|0\.\d[1-9])$/
// 23.40*12.00

const regex = /^([1-9]\d*\.\d{2}|0\.\d{2})\*([1-9]\d*\.\d{2}|0\.\d{2})$/
//// 23.40*12.00
Menu