extracting a particular field from a url

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chopzz
    New Member
    • Mar 2014
    • 1

    extracting a particular field from a url

    I want to extract particular fields from a url of a facebookpage. Iam not able to extract since link format is not static.eg:if I gave the below examples as input it should give the o/p as what we desire

    1)//https://www.facebook.co m/pages/Ice-cream/109301862430120 ?rf=10217302315 7556

    o/p -109301862430120

    2)https://www.facebook.co m/pages/Anti-Christian-sentiment149675 731889496?ref=b r_tf

    o/p - 149675731889496

    3)https://www.facebook.co m/pages/Gulab-jamun/108035329224130

    o/p - 108035329224130

    4)https://www.facebook.co m/pages/Tajmahal/108571669173264

    o/p - 108571669173264

    5)https://www.facebook.co m/Federer

    o/p - Federer

    These are the different url examples
  • Nepomuk
    Recognized Expert Specialist
    • Aug 2007
    • 3111

    #2
    So, I'm trying to understand the method behind your extractions... If there's a number somewhere in the text behind the last slash but before the question mark, you want that number? And if there's not, you want whatever is behind the slash? Or is there a typo in your 2nd example and you want the part between the last slash and either the end or the question mark?

    Comment

    Working...