So 02 becomes 2 - also is it possible to specifiy that they do not enter spaces? Ashley the numbers that I need to validate all need to have the first zero removed and also not allow for spaces to be entered...
Notice that when matching "caaaaaaandy", the match is "aaa", even though the original string had more a's in it. That is, it matches anything that is not enclosed in the brackets.Use the constructor function when you know the regular expression pattern will be changing, or you don't know the pattern and are getting it from another source, such as user input.A regular expression pattern is composed of simple characters, such as .The last example includes parentheses which are used as a memory device.The match made with this part of the pattern is remembered for later use, as described in Using parenthesized substring matches.
If used immediately after any of the quantifiers *, , ?