in reply to Regex an Array?
You anchor at the front and end to say that the whole string must match the pattern. You group and quantify to indicate repetitions./^[0-9]+(?:,[0-9]+)*$/;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Regex an Array?
by ikegami (Patriarch) on May 02, 2005 at 17:49 UTC | |
by Roy Johnson (Monsignor) on May 02, 2005 at 17:52 UTC | |
by Forsaken (Friar) on May 02, 2005 at 17:56 UTC |