驗證網址:https://www.regextester.com/22

const ipRegex = 
/^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.)
{3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/;

const portRegex = 
/^([0-9]{1,4}|[1-5][0-9]{4}|6[0-4][0-9]{3}|
65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$/;
arrow
arrow

    bingzhichen 發表在 痞客邦 留言(0) 人氣()