regex - Conflict with understanding a Javascript regular expression -


there javascript regular expression working with, conflicting understanding of how works.

the expression this: /^[0-9]+$/

so, if test regular expression on, value of textbox, understand check whether value starts @ least 1 digit, , ends @ least 1 digit. however, happening test being successful when whole value being numeric. if place alphabet in between, understand should make test successful, latter failing.

can clarify me on this? thanks.

yes, means series of 1 or more digits start end.

^[0-9].+[0-9]$ 

would give understanding of doing.


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -