Reg Exp

Results 1 to 3 of 3

Thread: Reg Exp

  1. #1
    Arky Guest

    Default Reg Exp

    I suck at reg exp and i know you guys are awesome at this. I was hoping some could give me code to do this.<BR><BR>I need to pull from the URL the directory they are in.<BR><BR>Example:<BR><BR><BR><BR>I have the code that grabs the URL and i need a function that would return just "Directory2" since this is variable (could be Directory3) i would like to use a regualar exp. They seem to be fast and exactly what I need, my efforts in making one have bombed. PLease help!<BR><BR>Arky

  2. #2
    PV Guest

    Default RE: Reg Exp

    function Directory(URL)<BR> {<BR> a= URL<BR> split = a.split("/")<BR> alert(split[4])<BR> }<BR><BR>The alert would give U the value of Directory.

  3. #3
    Arky Guest

    Default Thanks

    Thank you

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts