if (preg_replace('/-([^\d]+)$/',"",$name, $m)
  $number = $m[1];

-Peter

On Tue, Aug 12, 2008 at 5:32 PM, noskule <[EMAIL PROTECTED]> wrote:
> hi list
> I build serialized pages with powertools / serialname. What the best way
> to get the number out of the pagename? I want to do a pagevar $SerialNumber.
>
> I tried with a regexpr:
> Group.Name-0001
>  $number = preg_replace('/-[^\d]+$/',"",$name);
>
> I get -1 as result.
> Any suggestions?
> thanks nos
>
> _______________________________________________
> pmwiki-users mailing list
> [email protected]
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users
>

_______________________________________________
pmwiki-users mailing list
[email protected]
http://www.pmichaud.com/mailman/listinfo/pmwiki-users

Reply via email to