473,399 Members | 4,192 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Converting string into hyperlink

5
Hey there!
Does anyone have a ready to plugin function that takes as an argument arbitrary long string and converts links written as a string into actual links.
For example:
Input string is: Please, visit our website http://www.thescripts.com and find out more about programmers community. You can also go to http://www.thescripts.com/forum/archive/index.php/f-130.html if you need help in yari, yari, yari.

Output of the function should be:
Please, visit our website <a href=”http://www.thescripts.com”> http://www.thescripts.com</a> and find out more about programmers community. You can also go to <a href=”http://www.thescripts.com/forum/archive/index.php/f-130.html”> http://www.thescripts.com/forum/archive/index.php/f-130.html </a> if you need help in yari, yari, yari.

I start with String function indexOf(“http”) but after that I get stuck. I mean I can come up with algorithm but it is so inefficient and easy to get lost in. After finding first occurrence of http I use substring, tokenizer, split etc. Does not look right. I am working on free community website and want people to add their posts with links to their website's. As of now, this is the only thing that is missing. Any help would be appreciated.
Mar 24 '07 #1
1 5402
jijoja
5
Fellows, don't bother. I am through with this function. Easy one if enough time and thoughts are invested. Just about 10 lines of code. Take care. Have a nice day.
Mar 25 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: bpschmid | last post by:
Ive got a datagrid with a hyperlink column. I want to click on that column and go to another page, but here's the kicker, I need and want to pass not one, but two different query string parameters...
0
by: Nielsen | last post by:
Hi Question regarding Content Management Server and C# string survey = thisPosting.Placeholders.Datasource.RawContent.ToString() Label1.Text = survey Label1 shows correctly the value:...
1
by: jib | last post by:
Hiya, I have a data grid with one column being a "hyperlink column". I want to use this column to jump to another aspx page based on two different column values from the underlying dataset....
3
by: scorpion53061 | last post by:
I have little hope of resolving this as I have had to contact outside help. But I thought I would post it here to see if anyone could add an idea or solution. 1. I have a form in a Class...
1
by: Patrick.O.Ige | last post by:
Hi guys, I just moved a project from my pc to a server production (to an ISP). on my pc it all works fine with no errors. After fireing up the first page "default.aspx" i get the error...
1
by: Frank Milverckowitz | last post by:
Hi, I'm trying to do something common and what should be simple using the GridView "Add Columns" feature in Visual Studio 2005. All I want to do is add a Hyperlink column that will take the...
20
by: tshad | last post by:
I had posted this problem earlier and just noticed that the Hyperlink is the problem. Apparently, it doesn't figure out the path correctly. It uses the path of the file it is in, even if it is...
1
by: runway27 | last post by:
i need to insert a hyperlink to an sql query. there is a field in the table called url which consists of the url of a page, i would like this information to be displayed as a hyperlink so that i can...
5
by: Sobin Thomas | last post by:
Hi All, I want to pass a string that contains many special characters (: \ . _ etc) to another page in my website through query string. In my project I have a Gridview control ,in which there...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.