Regex which contains only numbers and some characters
I need regex which contains only 0-9 numbers and the following characters: -,+,# (but not require开发者_开发知识库d)
How should this be?
This should work with what you're looking for
/[0-9+#-]/
fixed as per comment below
How about ([0-9]|[\-+#])+
?
精彩评论