Step one in regexps is: decide if you really need them.
Things like checking wether a user inputted a number can be done using PHP's is_numeric() function.
Step two is: try them out.
grab the manual, and start trying things out to see what's happening.
Don't try to jump in the deep-end, you'll drown.
Start with simple pattern matching, like
if (preg_match('/a/', 'Hello all'))
{
echo 'Match';
}
else
{
echo 'No match';
};
Then start adding more complex things, like making sure a string starts with an 'a':
preg_match('/a/', 'Hello all')
or ends with an 'a':
preg_match('/a$/', 'Hello all')
or wether it has any numbers in it
preg_match('/[0-9]+/', 'Hello all')
then to make sure the string starts with 'Hello', then a space, then some random stuff that can be anything, then a space and then at least two numbers:
preg_match('/Hello .* [0-9]{2,}/', 'Hello all, these are two number: 23. Wow!')