I am attempting to limit the number of results from a string. An example string I’m working with is:
2013 910 1102 0 203 398
Rather than using a match array, I’d like the regular expression to match only the first three digits. These happen to be memory usage, so the numbers could be smaller or larger.
Any help is greatly appreciated.
Just match from the beginning of the string and then the next three digits. Like this:
Where:
EDIT:
With the extra requirements this should help you out:
This will capture the first three groups of digits.