I'm horrible at regex's, maybe someone can help me out.

What I'm trying to do is parse a string in the format:  number-number-number
(ex.  1-23123-312039128)

I need to pull that second number, regardless of length

This code returns nothing:

$part = ereg("([0-9]{1})-([0-9])-", $f, $regs);

but

$part = ereg("([0-9]{1})-([0-9]{1,10})-", $f, $regs);

will return the number, but I don't want to take a chance and limit it to 10
characters.  I thought the first bit of code would work.. any ideas what is
wrong?

Thanks,
Chad


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to