Re: WebDNA Grep help wanted
This WebDNA talk-list message is from 2004
It keeps the original formatting.
numero = 56201
interpreted = N
texte = >> Hi all,>> >> I have a messageboard developed in WebDNA. The messageboard does not>> accept HTML syntax due to security. In stead I have made a parsingt>> system which translate forum specific tags to HTML behind the scenes.>> >> [/b]If I wanted to post a message in the forum with bold words it>> would look like this[/b]>> >> [/i]If I wanted to post a message in the forum with italic words it>> would look like this[/i]>> >> The grep lines handling this process is pasted below, but it can't>> handle a line like this. And here I need some help...>> >> [b] this is a line of bold words including one word in>> [i]italic[/i], but it won't work - only the italic-tags are parsed>> correctly[/b]>> >> Any help is appreciated...> > > > The simple solution is to use two nested greps, one for bold and the> other for the italics.A nested solution would be order dependent. The grep breaks because itfinds the [i before [/b. Better to loop for all possible combinations basedon a maximum nested tag depth. That said, convertwords is a good the way togo for solutions like these. -------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list
.To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Associated Messages, from the most recent to the oldest:
>> Hi all,>> >> I have a messageboard developed in WebDNA. The messageboard does not>> accept HTML syntax due to security. In stead I have made a parsingt>> system which translate forum specific tags to HTML behind the scenes.>> >> [/b]If I wanted to post a message in the forum with bold words it>> would look like this[/b]>> >> [/i]If I wanted to post a message in the forum with italic words it>> would look like this[/i]>> >> The grep lines handling this process is pasted below, but it can't>> handle a line like this. And here I need some help...>> >> [b] this is a line of bold words including one word in>> [i]italic[/i], but it won't work - only the italic-tags are parsed>> correctly[/b]>> >> Any help is appreciated...> > > > The simple solution is to use two nested greps, one for bold and the> other for the italics.A nested solution would be order dependent. The grep breaks because itfinds the [i before [/b. Better to loop for all possible combinations basedon a maximum nested tag depth. That said, convertwords is a good the way togo for solutions like these. -------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
William DeVaul
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
2.1 bugs left over from beta cycle (1998)
How to include weather (2000)
Bug Report, maybe (1997)
math/text variable limits per page (2001)
DB Commit (2000)
nesting limits? (1998)
Reversed words (1997)
message forum question (2005)
boldwords funky (1998)
customizing the color of user's pages (1997)
[OT] Xserve (2002)
WebCat2 - Getting to the browser's username/password data (1997)
Text limits in NT version? (1997)
Sendmail (2000)
email database file (2005)
Pre-flight public flag (1997)
Please post more "exceptions to the rules" ... (2005)
Nested tags count question (1997)
What is WebDNA (1997)
javascript implementation of MD5 algorithm for Authorize.Net (2003)