473,385 Members | 1,693 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,385 software developers and data experts.

breaking information out of a string

I want to make custom tags that will go into a string like the following

"Follow this link [link url="me.aspx"]Link Title Text[/link]"

this is an example of course... but how would you go about creating a custom
tag system like this? I want to be able to take that and convert it into its
HTML equivilent

"Follow this link <a href="me.aspx">Link Title Text</a>"

thanks!
Jun 19 '06 #1
2 1008
I can think of a couple of ways. One is to look for tokens and parse them.
This is not elegant, but it will work as long as you cover all of your tags.

A better option is to study Regex and do Regex replacements. This performs
well, but will take a bit of a learning curve to get Regex down.

--
Gregory A. Beamer

*************************************************
Think Outside the Box!
*************************************************
"Smokey Grindle" <no********@dontspam.net> wrote in message
news:uS**************@TK2MSFTNGP02.phx.gbl...
I want to make custom tags that will go into a string like the following

"Follow this link [link url="me.aspx"]Link Title Text[/link]"

this is an example of course... but how would you go about creating a
custom tag system like this? I want to be able to take that and convert it
into its HTML equivilent

"Follow this link <a href="me.aspx">Link Title Text</a>"

thanks!

Jun 20 '06 #2
Smokey,

I don't understand why you set it in this mnemonic code. I would not do it
that way, but if it is needed, than it needs in my opinion only two replaces
to set it in the wanted format. So I would use those replaces.

Cor

"Smokey Grindle" <no********@dontspam.net> schreef in bericht
news:uS**************@TK2MSFTNGP02.phx.gbl...
I want to make custom tags that will go into a string like the following

"Follow this link [link url="me.aspx"]Link Title Text[/link]"

this is an example of course... but how would you go about creating a
custom tag system like this? I want to be able to take that and convert it
into its HTML equivilent

"Follow this link <a href="me.aspx">Link Title Text</a>"

thanks!

Jun 20 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: gsb | last post by:
I would like to randomly reorder the characters in a string. I wrote a function breaking the string into arrays, assigning Rangoon numbers and reassembling the string. Is there an easier way? ...
2
by: Thomas Brooks | last post by:
Hi everybody.... Here's a question for you. I think the answer is simple, but I'm not sure how to go about it...what I want to do is to break down a string into components. I already know...
15
by: Daren | last post by:
Hi, I need to be able to split large string variables into an array of lines, each line can be no longer than 70 chars. The string variables are text, so I would additionally like the lines...
10
by: dba123 | last post by:
Why am I getting this error for Budget? Error: An exception of type 'System.FormatException' occurred in mscorlib.dll but was not handled in user code Additional information: String was not...
6
by: amatuer | last post by:
I usesd this to display info on a page: <% While not rstMain.eof %> <tr> <td><font size="-1"><%= rstMain("Datum") %></font></td> <!-- <td><font size="-1"><b>Client no</b></font></td> -->...
2
by: Smokey Grindle | last post by:
I want to make custom tags that will go into a string like the following "Follow this link Link Title Text" this is an example of course... but how would you go about creating a custom tag...
8
by: shapper | last post by:
Hello, I have a string which holds a text. Is it possible to create a substring which uses the first N words of that string? Thanks, Miguel
5
by: creative1 | last post by:
hi, I am new at writing JSP and Servlets. When I compile my serverlet I get follwoing error cannot find mymbol method parseDate(java.lang.String) I have follwoing code: Code: ( text )...
12
by: charanraj1191g | last post by:
Can any one help me out. I have designed a form in which I have one text box and a submit button. User can type in a message which can be of variable length and include spaces. I want to break...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...

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.