SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: regex extention

Hybrid View

  1. #1
    SitePoint Zealot
    Join Date
    Jan 2010
    Posts
    132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    regex extention

    I have url like this i want it to accept .pdf and .PDF

    $url =~ m|\/([\d\]*-[\d\]*\.pdf)$|;
    any help??

  2. #2
    SitePoint Wizard bronze trophy Jeff Mott's Avatar
    Join Date
    Jul 2009
    Posts
    1,276
    Mentioned
    18 Post(s)
    Tagged
    0 Thread(s)
    $url =~ m|\/([\d\]*-[\d\]*\.pdf)$|i;

    The "i" in red I added means "case-insensitive."
    "First make it work. Then make it better."

  3. #3
    SitePoint Zealot
    Join Date
    Jan 2010
    Posts
    132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks,Jeff Mott


Bookmarks

Posting Permissions

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