Grep question [parsing variables] problem
This WebDNA talk-list message is from 2003
It keeps the original formatting.
numero = 47280
interpreted = N
texte = Hi all,Trying to create a parsing mechanism, but can't get it to work the right way.I am posting a form like this examplethis is a test [b]with bold [i]and bold italic[/i] wordsThe text above is put into the variable set_main_txt which should be parsed through this grep parsing engine in the order below, which means that it first checks for [b] and [/b] and replaces them with
and and then do the same with [i]...[!] -- REPLACE [b] WITH
(ignore case) text [/!][text]set_main_txt=[grep search=\[[bB]\]([^[unurl]%5B[/unurl]]*)\[/[bB]\]&replace=\1 b>][text]set_main_txt[/text][/grep][/text][!] -- REPLACE [i] WITH (ignore case) text [/!][text]set_main_txt=[grep search=\[[iI]\]([^[unurl]%5B[/unurl]]*)\[/[iI]\]&replace=\1 i>][text]set_main_txt[/text][/grep][/text]My problem is that the [b] and the [/b] does NOT get parsed while the [i] and [/i] gets parsed correctly. The result is that when I output the variable set_main_txt only the word and bold italic get written in italic but nothing is written in bold.Hope someone can help me out here...PowerPallehttp://www.qt.dk/(The new WebDNA Forum in development)-------------------------------------------------------------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,Trying to create a parsing mechanism, but can't get it to work the right way.I am posting a form like this examplethis is a test [b]with bold [i]and bold italic[/i] wordsThe text above is put into the variable set_main_txt which should be parsed through this grep parsing engine in the order below, which means that it first checks for [b] and [/b] and replaces them with and and then do the same with [i]...[!] -- REPLACE [b] WITH (ignore case) text [/!][text]set_main_txt=[grep search=\[[bB]\]([^[unurl]%5B[/unurl]]*)\[/[bB]\]&replace=\1 b>][text]set_main_txt[/text][/grep][/text][!] -- REPLACE [i] WITH (ignore case) text [/!][text]set_main_txt=[grep search=\[[iI]\]([^[unurl]%5B[/unurl]]*)\[/[iI]\]&replace=\1 i>][text]set_main_txt[/text][/grep][/text]My problem is that the [b] and the [/b] does NOT get parsed while the [i] and [/i] gets parsed correctly. The result is that when I output the variable set_main_txt only the word and bold italic get written in italic but nothing is written in bold.Hope someone can help me out here...PowerPallehttp://www.qt.dk/(The new WebDNA Forum in development)-------------------------------------------------------------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/
Palle Bo Nielsen
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:
Calculating multiple shipping... (1997)
Secure Web Server (1999)
WebCat2 - [format thousands] (1997)
Setting up shop (1997)
Press Release hit the NewsWire!!! (1997)
WebCatalog NT beta 18 problem (1997)
[delete] problem (1997)
[WebDNA] AJAX module (2012)
Different Email recipients? (1998)
NT Version on IIS 4.0 (1997)
Wanted: More Math Functions (or, Can You Solve This?) (1997)
need some help with a loop [nested search?] (1999)
[OT] OSX 3D-Secure support (2006)
Adding up line items. (2000)
WebDNA performance comparisons? (2004)
Comments in db? (1997)
emailer (1997)
HTML encoding in URLs (1997)
Webcat 2.0.1 date math bug -> Crash! (1997)
Reloading adds items - how to prevent?? (1998)