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
Post a Comment