breaking information out of a string

S

Smokey Grindle

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!
 
C

Cowboy \(Gregory A. Beamer\)

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!
*************************************************
 
C

Cor Ligthert [MVP]

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,521
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top