|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
breaking information out of a stringI 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! 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. -- Show quoteHide quoteGregory A. Beamer ************************************************* Think Outside the Box! ************************************************* "Smokey Grindle" <nospamhere@dontspam.net> wrote in message news:uSIrDG9kGHA.4792@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! > 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 Show quoteHide quote "Smokey Grindle" <nospamhere@dontspam.net> schreef in bericht news:uSIrDG9kGHA.4792@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! >
Oracle read only transaction in VB .NET?
Security Exception when deploying a VB.NET 2003 solution. Concurrency question Help me, please view the strange problem!!! making a string var like "nr1 nr2 nr3" retrieve key from collection windows Registry parameter "any" VB 6 (what is your equivalent in vb 2005 ?) Importing Text File With Diacritical Marks Viewing Data in a DataSet during debug |
|||||||||||||||||||||||