Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - String Question
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

String Question

 Post Reply Post Reply
Author
pmormr View Drop Down
Senior Member
Senior Member


Joined: 06 January 2003
Location: United States
Status: Offline
Points: 1479
Post Options Post Options   Thanks (0) Thanks(0)   Quote pmormr Quote  Post ReplyReply Direct Link To This Post Topic: String Question
    Posted: 03 July 2004 at 12:45am

I'm doing some pretty basic work with strings. What i'm doing is designing a program to pick weblinks out of a bunch of emails... i've got it to the point where i've got to decide if the line that i have read into a string contains a hyperlink. What i'm wondering is if there's an easy way to do it. All the hyperlinks follow pretty much the same format... i.e. http://www.something.com/scripts/runner.php?EA=2004070223584 40128. My only problem is that, sometimes they might be surrounded by HTML tags and they're not always the same length. but they all contain http://www., .com, /scripts/runner.php?. My best guess would be to do a search for each of those parts and dump it if it doesn't contain all of them. Except i don't know how to search .

Thanks again

Back to Top
Mart View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 November 2002
Status: Offline
Points: 2304
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mart Quote  Post ReplyReply Direct Link To This Post Posted: 03 July 2004 at 5:03am

You can use Regular Expressions for that:

http://www.devjunkies.com/?name=viewart&type=1&tid=5 2

Back to Top
pmormr View Drop Down
Senior Member
Senior Member


Joined: 06 January 2003
Location: United States
Status: Offline
Points: 1479
Post Options Post Options   Thanks (0) Thanks(0)   Quote pmormr Quote  Post ReplyReply Direct Link To This Post Posted: 03 July 2004 at 11:29am

so i would just throw those three literals in and it'll search for it for me?

Back to Top
Mart View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 November 2002
Status: Offline
Points: 2304
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mart Quote  Post ReplyReply Direct Link To This Post Posted: 03 July 2004 at 11:51am

First you need to write a search pattern to recognise links - do a google

Then use Regexp to extract the matches (links)

Back to Top
pmormr View Drop Down
Senior Member
Senior Member


Joined: 06 January 2003
Location: United States
Status: Offline
Points: 1479
Post Options Post Options   Thanks (0) Thanks(0)   Quote pmormr Quote  Post ReplyReply Direct Link To This Post Posted: 03 July 2004 at 12:14pm
i got it... i used http://www.*.com/scripts/runner.* as my search and turned on singleline and ignorecase for the options and it works... thanks for ur help
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.