Re: ReplaceFoundItems Problem
This WebDNA talk-list message is from 2003
It keeps the original formatting.
numero = 52972
interpreted = N
texte = I think you were actually on the right track with the search and replaceitems... Without this, you don't have access to the record-specific "comments" field for your grep, and all your records will end up with a "comments" value of "[comments]".Are you wanting the actual text "%0A" to be inserted in the DB, or the LF character that %0A represents?If you want %0A, then change your grep replace to [url]%0A[/url], as John suggested.If you want the LF character, I think you're out of luck, as I believe WebDNA will strip that when writing to the db.- brianOn Thursday, September 18, 2003, at 11:17 AM, Justin Carroll wrote:> John,>> Thanks for helping me out with my problem. The answer to all of your > "why" questions is that WebDNA is new to me and I'm trying to learn it > in the best way possible. Thanks again.>> Justin Carroll>> On Friday, November 6, 1942, John Peacock
wrote:>> Justin Carroll wrote:>>>>> I'm trying to search a field of my database and replace all>> of the
tags with %0A. When I run this code:>>>>>> [search db=tabed.db&geskudatarq=0]>>> [replacefounditems]comments=[grep>> search=
&replace=%0A][comments][/grep][/replacefounditems]>>> [commitdatabase db=tabed.db]>>> [/search]>>>>>> ... it takes out all the
tags just fine but it doesn't>> replace them with the %0A. Does anyone know why this may be >> happening? Thanks.>>>>>>> A) Why are you using [search] and [replacefounditems] when your >> [search] is for>> all records. The only reason to use [replacefounditems] is when you >> are only>> hitting some records in the database.>>>> B) Why are you adding [commitdatabase] in the middle of your [search] >> loop?>> This will just make sure that the search/replace takes _much_ longer. >> A>> [replace] always does an implied [exclusivelock] at the beginning and >> an implied>> [commitdatabase] at the end.>>>> C) Always use [url]>>>> D) No, really, always use [url]!!!>>>> This should do what you want:>>>> [replace db=tabed.db&geskudatarq=0]comments=[grep>> search=
&replace=[url]%0A[/url]][comments][/grep][/replace]>>>> HTH>>>> John>>>> -- >> John Peacock>> Director of Information Research and Technology>> Rowman & Littlefield Publishing Group>> 4501 Forbes Boulevard>> Suite H>> Lanham, MD 20706>> 301-459-3366 x.5010>> fax 301-429-5748>-- Brian Fries, BrainScan Software -- http://www.brainscansoftware.com ---------------------------------------------------------------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:
I think you were actually on the right track with the search and replaceitems... Without this, you don't have access to the record-specific "comments" field for your grep, and all your records will end up with a "comments" value of "[comments]".Are you wanting the actual text "%0A" to be inserted in the DB, or the LF character that %0A represents?If you want %0A, then change your grep replace to [url]%0A[/url], as John suggested.If you want the LF character, I think you're out of luck, as I believe WebDNA will strip that when writing to the db.- brianOn Thursday, September 18, 2003, at 11:17 AM, Justin Carroll wrote:> John,>> Thanks for helping me out with my problem. The answer to all of your > "why" questions is that WebDNA is new to me and I'm trying to learn it > in the best way possible. Thanks again.>> Justin Carroll>> On Friday, November 6, 1942, John Peacock wrote:>> Justin Carroll wrote:>>>>> I'm trying to search a field of my database and replace all>> of the
tags with %0A. When I run this code:>>>>>> [search db=tabed.db&geskudatarq=0]>>> [replacefounditems]comments=[grep>> search=
&replace=%0A][comments][/grep][/replacefounditems]>>> [commitdatabase db=tabed.db]>>> [/search]>>>>>> ... it takes out all the
tags just fine but it doesn't>> replace them with the %0A. Does anyone know why this may be >> happening? Thanks.>>>>>>> A) Why are you using [search] and [replacefounditems] when your >> [search] is for>> all records. The only reason to use [replacefounditems] is when you >> are only>> hitting some records in the database.>>>> B) Why are you adding [commitdatabase] in the middle of your [search] >> loop?>> This will just make sure that the search/replace takes _much_ longer. >> A>> [replace] always does an implied [exclusivelock] at the beginning and >> an implied>> [commitdatabase] at the end.>>>> C) Always use [url]>>>> D) No, really, always use [url]!!!>>>> This should do what you want:>>>> [replace db=tabed.db&geskudatarq=0]comments=[grep>> search=
&replace=[url]%0A[/url]][comments][/grep][/replace]>>>> HTH>>>> John>>>> -- >> John Peacock>> Director of Information Research and Technology>> Rowman & Littlefield Publishing Group>> 4501 Forbes Boulevard>> Suite H>> Lanham, MD 20706>> 301-459-3366 x.5010>> fax 301-429-5748>-- Brian Fries, BrainScan Software -- http://www.brainscansoftware.com ---------------------------------------------------------------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/
Brian Fries
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:
Error: Too many nested [xxx] contexts (1997)
WCS Newbie question (1997)
[Announce] WebCatalog 3.0 Beta Program (1998)
[Sum] function? (1997)
WebCat2b14MacPlugIn - [include] doesn't hide the search string (1997)
Hello??? (1997)
problem with WebDNA Command (2004)
Re2: frames & carts (1997)
Site Downloaders (2002)
XMLPASE and Amazon XML feeds (2004)
Problems passing [SKU] with $Replace in 2.0 (1997)
WebCat2b15MacPlugin - showing [math] (1997)
when will the list move? (nm) (2000)
WebCatalog can't find database (1997)
Bug Report, maybe (1997)
WebCatalog for guestbook ? (1997)
[Summary] re: Emailer setup (1997)
Um. silly question perhaps...but I don't know, so I'm askin'.. (2001)
Problem: 3.0 doesn't update carts (1997)
Command=Showcart? (2000)