javascript - how to create a regex that has 2 possible conditions -


hi guys i'm wondering how make regex doesnt allow spaces or numbers current code works numbers , space. want numbers or spaces.

/([0-9])\s+/g 

only works on numbers spaces @ end, need work numbers , spaces in order

include space character in square brackets:

[0-9\s]+ 

or if you're looking excluding spaces , numbers (\d means digit, same 0-9):

[^\d\s]+ 

Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -