$regexp_matches=preg_match("/[0-9]{10}*?$/",_$regexp_string[$i]);
Those are called Regular Expressions, the bread and butter of string searching/matching (in my opinion).
^ is matching the beginning of a line.
[0-9] is the same as saying /\d. (match a digit character at the begining of a line).
{10} is limiting the number of digits to ten, an alternative would be {5,10} wich is the same as saying match a string of digits at least 5 characters long and no longer than 10.
- means you want to do this 0 or more times.
? is to match it 1 or more times.
$ is to match the end of the line.
the problem I see is that this numbers you are trying to grep will need to start at the begining of the line, unless you are sure that this will be a constant I'd say that this is kind of restrictive.
I see no practical implementation for it, especially having to declare all those
$regexp_string[X]="X";'s.
Now if you were to read an email with it or some sort of form, then you've got something.
Then you could use soemthing like:
$regexp_matches =preg_match_all ("/\d{10}*?/", $string, $matches);
You are loading the matches in an array and thus you could extract the values you want and use them.
$what_i_want =($matches[0]);
/* here do whatever with $what_i_want */
And to ensure that you are getting really what you are after you could say (like in the case of reading an email that is kind of preformed or has some sort of fixed pattern) :
$regexp_matches =preg_match_all ("/(what_ever_word_that_comes_before_the_number) (\d{10}) (*?)/", $string, $matches);
Your info would be in $matches[2][1] or something like that.
However you should always to a "print_r($matches)" and see the html source to both check the effectivenes of the code and the location of the matched string.