Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Regular Expression for Getting file urls.

Regular Expression for Getting file urls.

Scheduled Pinned Locked Moved C#
helpregex
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    Neo_Shehpar
    wrote on last edited by
    #1

    hi all, i want to detect all the pdf files link which are downloadable on webpage, i need regular expression for that so that i can detect all the links. can any one here to help me in that issue, i shall be thankful to my friend. Regards, Neo

    E Z 2 Replies Last reply
    0
    • N Neo_Shehpar

      hi all, i want to detect all the pdf files link which are downloadable on webpage, i need regular expression for that so that i can detect all the links. can any one here to help me in that issue, i shall be thankful to my friend. Regards, Neo

      E Offline
      E Offline
      Ed Poore
      wrote on last edited by
      #2

      Can't you just search for

      [^\"\<\>\|\x0000\x0001\x0002\x0003\x0004\x0005\x0006\a\b\t\n\v\f\r\x000e\x000f\x0010\x0011\x0012\x0013\x0014\x0015\x0016\x0017\x0018\x0019\x001a\x001b\x001c\x001d\x001e\x001f\:\*\?\\\/]+\.pdf

      Basically what I've done here is used Reflector to look for all characters which .NET believes are invalid filename characters (the bit inside the [^...]``+, the regex then looks for a group of one or more of these characters followed by a .pdf (\.pdf). Have not tested it and do not accept resposability ;P

      1 Reply Last reply
      0
      • N Neo_Shehpar

        hi all, i want to detect all the pdf files link which are downloadable on webpage, i need regular expression for that so that i can detect all the links. can any one here to help me in that issue, i shall be thankful to my friend. Regards, Neo

        Z Offline
        Z Offline
        zinc_z
        wrote on last edited by
        #3

        Thanks , But I am using Sockets and dont want to use Remoting. So what If I put my assembly in GAC and App A and App B access it from there ? would not it be shared among these 2 applications ? and If I put singlton patteren on Class X to create only object then shoudl't App A and App B get same object ? OR even if u put assembly in GAC , everny App creates its own instance of assembly ? Thanks

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups