Loading ...
Sorry, an error occurred while loading the content.

Re: [PBML] strings

Expand Messages
  • Dan Boger
    On Thu, 27 Apr 2000 21:55:48 +0200 sjaak nabuurs wrote ... well, if you know that the first 3 numbers are one dir, and the rest
    Message 1 of 4 , Apr 27, 2000
    • 0 Attachment
      On Thu, 27 Apr 2000 21:55:48 +0200 "sjaak nabuurs" <sjaaknabuurs@...> wrote
      concerning '[PBML] strings':
      > Hi
      >
      > Does anyone know how to do this :
      >
      > I have 15000 numbers like 0134567
      >
      > 013 is a subdirectory and 4578 is a subdirectory bellow 013
      > How can I seperate this number to www.domainname.com/013/4567

      well, if you know that the first 3 numbers are one dir, and the rest
      are the other dir, you can do this:

      foreach (<>) {
      /(\d{3})(\d+)/;
      ($dir1, $dir2) = ($1, $2);
      $url = "www.domainname.com/$dir1/$dir2";
      }

      Dan

      Dan Boger - Georgetown Institute for Cognitive and Computational Sciences
      dan@... ICQ: 1130750
      Georgetown University Medical Center Washington, DC
    Your message has been successfully submitted and would be delivered to recipients shortly.