RegEx for Numbers
RegEx for Numbers
This script should report "good" but is failing. I need a function that tests if a string starts with a number.
- string test()
- {
- street = "12 yadda";
- if (!(street.matches("^\d+")))
- {
- yo = "bad";
- }
- else
- {
- yo = "good";
- }
- return yo;
- }
Cheers,
John Whitney