> Of course :
>
> I don't know PHP but I think match is the closer equivalent of ereg
>
> re.match(string) or string.match(re) => object matchdata
>
> This object matchdata has methods like pre_match and post_match.

thanks a lot, that's exactly what i was looking for!