Regular expression, let me die, I only write a judgment that can only enter number!

you can only enter numbers

function NumberOnly(e, pnumber){

  if (!/^\d+$/.test(pnumber)){
    $(e).val(/^\d+/.exec($(e).val()));
  }

}

has been writing this for a long time: I can only enter numbers
I use this function
with onkeyup, but now I want other judgments, but I am dead in my mind, and it is really difficult to understand the regular table!?.
if you want to save me from a god who understands the rules and regulations, you can attach a better principle! I want to go to school!

  1. cannot enter blank
  2. can only type in lowercase English and -
  3. can only enter lowercase English and numbers
Mar.23,2021

  1. / ^\ slap swab G
  2. / ^ [a murz\ -] * $/ g
  3. / ^ [a-z0-9] * $/ g

OK, with Baidu and Google, nothing is a problem


http://www.lixuejiang.me/2016.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b36d5b-2b7c2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b36d5b-2b7c2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?