Print Page | Close Window

String Question

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: ASP.NET Discussion
Forum Description: Discussion and chat on ASP.NET related topics.
URL: https://forums.webwiz.net/forum_posts.asp?TID=11076
Printed Date: 29 March 2026 at 5:17am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: String Question
Posted By: pmormr
Subject: String Question
Date 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=200407022358440128 - 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 - 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



-------------
Paul A Morgan

http://www.pmorganphoto.com/" rel="nofollow - http://www.pmorganphoto.com/



Replies:
Posted By: Mart
Date Posted: 03 July 2004 at 5:03am

You can use Regular Expressions for that:

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



Posted By: pmormr
Date Posted: 03 July 2004 at 11:29am

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



-------------
Paul A Morgan

http://www.pmorganphoto.com/" rel="nofollow - http://www.pmorganphoto.com/


Posted By: Mart
Date 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)



Posted By: pmormr
Date Posted: 03 July 2004 at 12:14pm
i got it... i used http://www.*.com/scripts/runner.* - http://www.*.com/scripts/runner.* as my search and turned on singleline and ignorecase for the options and it works... thanks for ur help

-------------
Paul A Morgan

http://www.pmorganphoto.com/" rel="nofollow - http://www.pmorganphoto.com/



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net