Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6007309
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T01:39:45+00:00 2026-05-23T01:39:45+00:00

I’m building a Facebook App which grabs the URLs from various sources in a

  • 0

I’m building a Facebook App which grabs the URLs from various sources in a user’s Facebook acount–e.g., a user’s likes.

A problem I’ve encountered is that many Facebook entries have string which are not URLs in their “website” and “link” fields. Facebook does no checking on user input so these fields can essentially contain any string.

I want to be able to process the strings in these field such that URLs like "http://google.com", "https://www.bankofamerica.com", "http://www.nytimes.com/2011/06/13/us/13fbi.html?_r=1&hp", "bit.ly", "www.pbs.org" are all accepted.

And all the strings like "here is a random string of text the user entered", "here'\s ano!!! #%#$^ther weird random string" are all rejected.

It seems to me the only way to be “sure” of a URL is to attempt to resolve it, but I believe that will be prohibitively resource intensive.

Can anyone think of clever way to regex or otherwise analyze these strings such that “a lot” of the URLS are properly captured–80%? 95% 99.995% of URLs?

Thanks!


EDIT: FYI, I’m developing in Python. But a language agnostic solution is great as well.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T01:39:46+00:00Added an answer on May 23, 2026 at 1:39 am

    There are numerous tools for validating URLs depending on your development language. Assuming you are developing in JavaScript, a quick Google search unearths many approaches, depending on the level of robustness your need requires.

    See http://www.w3.org/Addressing/URL/url-spec.txt for the authoritative specification.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We're building an app, our first using Rails 3, and we're having to build
I have a text area in my form which accepts all possible characters from
I need to clean up various Word 'smart' characters in user input, including but
I am writing an app for my school newspaper, which is run completely online
I am currently running into a problem where an element is coming back from
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small
I would like to run a str_replace or preg_replace which looks for certain words

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.