Loading ...
Sorry, an error occurred while loading the content.
Skip to search.
 

Re: checking links in javascript

Expand Messages
  • Eugeny.Sattler@RU.NESTLE.com
    ... javascript:(.*) ([ ](.*(s?html?|gif|jpe?g|png|jsp|cfm|zip|exe|aspx?|pl|p df|xml|ra|asx|ram|swf|php)( ?.*)?)[ ](.*) ; ...
    Message 1 of 35 , Oct 3, 2004
      > Regexp reXenu =
      >
      "javascript:(.*)\\(['\"](.*(s?html?|gif|jpe?g|png|jsp|cfm|zip|exe|aspx?|pl|p
      df|xml|ra|asx|ram|swf|php)(\\?.*)?)['\"](.*)";

      > so I get a match for
      >
      > javascript:openPopup("http://www.backbonemag.com/php_site/home.php?
      > m_column_id=php_news/wmview.php?ArtID=702",850,550);

      > and this regexp works for all links on
      > http://webfeat.com/html/news/articles.asp

      > but no match on your site for for
      > javascript:openSite('http://www.airnyx.de/')
      > javascript:openSite('http://www.meteor-wifi.com/en/')
      >
      javascript:openSite('http://www.swisscom-eurospot.com/index.php/internet/de'
      )
      > javascript:openSite('http://www.mycloud.net')
      > javascript:openSite('http://www.tiscali.de')

      I suggest such a regexp

      javascript:\w+\s*\(\s*['\"]((?:ftp|https?)://[^'\"]+?)['\"](?:\s*,[^,]+?\s*)
      *\s*\);

      Tested in PowerGREP and works fine. It means this regexp is perl-compatible.
      You just need to escape some special C++ sumbols (if there are any) with a
      backslash to make it friendly with C++ compiler.

      I find this regexp better than above-suggested because it catches not only
      URLs ending with extensions listed bu any sequence of symbols that are not
      single or double quotes - thanks to negated character class [^'\"] repeated
      with plus ['\"]+.

      Here is my regexp output:
      http://www.airnyx.de/
      http://www.meteor-wifi.com/en/
      http://www.swisscom-eurospot.com/index.php/internet/de
      http://www.mycloud.net
      http://www.tiscali.de
      http://www.backbonemag.com/php_site/home.php?m_column_id=php_news/wmview.php
      ?ArtID=702

      --
      Eugeny
    • Tilman Hausherr
      Did anyone try to run Xenu with Sandboxie? Does it work? I m thinking about mentioning it on my web page so that paranoid people can use Xenu too :) Tilman
      Message 35 of 35 , Sep 18, 2010
        Did anyone try to run Xenu with Sandboxie? Does it work? I'm thinking
        about mentioning it on my web page so that paranoid people can use Xenu
        too :)

        Tilman
      Your message has been successfully submitted and would be delivered to recipients shortly.