I need some help on regular expressions. I want to extract the parent class name of some class in a source file.
say, $source was read from a file, and now
$source == "<? class child extends parent { ..blah.. } ?>
i need to extract "parent" from this string.
i tried the following:
eregi('class\s+.extends\s+(.)\s+{', $line, $regs);
// now $regs[1] should contain what i need.
something's wrong here. can anybody tell me what? thanks in advance..