Coder Social home page Coder Social logo

Detect URLs about csv2rw HOT 3 CLOSED

farling42 avatar farling42 commented on August 29, 2024
Detect URLs

from csv2rw.

Comments (3)

farling42 avatar farling42 commented on August 29, 2024

An example of what actually appears in the RWexport file (after decoding):

<p class="RWDefault"><span class="RWSnippet">Here is some text with an embedded <a class="RWLink" style="color:#000000;text-decoration:none" href="http://www.amusingtime.uk/" title="http://www.amusingtime.uk/"><span class="RWLink">http://www.amusingtime.uk/</span></a></span><span class="RWSnippet"> within it.</span></p>

At the beginning of a snippet, it appears as:

<p class="RWDefault"><span class="RWLink" style="color:#000000"><a class="RWLink" style="color:#000000;text-decoration:none" href="http://amusingtime.uk/somedir?query" title="http://amusingtime.uk/somedir?query"><span class="RWLink">http://amusingtime.uk/somedir?query</span></a></span><span class="RWSnippet"> appears at the start of the lien.</span><span class="RWSnippet">&nbsp;</span></p>

from csv2rw.

farling42 avatar farling42 commented on August 29, 2024

One possible RegExp which will detect a URL is:

((http[s]?|ftp):\/)?\/?([^:\/\s]+)((\/\w+)*\/)([\w\-\.]+[^#?\s]+)(.*)?(#[\w\-]+)?

obviously the first bit can be replaced by something that finds any sequence of letters.

from csv2rw.

farling42 avatar farling42 commented on August 29, 2024

Implemented in V1.14

The regular expression used to match a URL might need improvement.

from csv2rw.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.