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 it finds the [i before [/b. Better to loop for all possible combinations based on a maximum nested tag depth. That said, convertwords is a good the way to go 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:

    
  1. Re: WebDNA Grep help wanted ( Kenneth Grome 2004)
  2. Re: WebDNA Grep help wanted ( Gary Krockover 2004)
  3. Re: WebDNA Grep help wanted ( Kenneth Grome 2004)
  4. Re: WebDNA Grep help wanted ( William DeVaul 2004)
  5. Re: WebDNA Grep help wanted ( Kenneth Grome 2004)
  6. Re: WebDNA Grep help wanted ( Gary Krockover 2004)
  7. Re: WebDNA Grep help wanted ( devaulw@onebox.com 2004)
  8. Re: WebDNA Grep help wanted ( devaulw@onebox.com 2004)
  9. Re: WebDNA Grep help wanted ( "Andrew Simpson" 2004)
  10. Re: WebDNA Grep help wanted ( Palle Bo Nielsen 2004)
  11. Re: WebDNA Grep help wanted ( "Andrew Simpson" 2004)
  12. WebDNA Grep help wanted ( Palle Bo Nielsen 2004)
>> 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 it finds the [i before [/b. Better to loop for all possible combinations based on a maximum nested tag depth. That said, convertwords is a good the way to go 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:

WebCatalog can't find database (1997) Search/sort in URL Was: GuestBook example (1997) SSL and reg web*L and reg web* (1997) Mac Programs (1998) listfields for a table (2007) RE: Can a database get stomped by simultaneous access? (1997) Formating found categories (1997) Sorting by date (1997) Emailer setup (1997) using showpage and showcart commands (1996) [WebDNA] port from mime headers? (2017) Ok here is a question? (1997) too many nested ... problem (1997) Encyption mail was Suggestions for Topics ... (1998) Setting user/password with a form. (2000) Migrating to NT (1997) Refering page (1998) decrypt trouble (2006) Not really WebCat (1997) Max Record length restated as maybe bug (1997)