Re: ReplaceFoundItems Problem

This WebDNA talk-list message is from

2003


It keeps the original formatting.
numero = 52970
interpreted = N
texte = 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 ------------------------------------------------------------- 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: ReplaceFoundItems Problem ( Rob Marquardt 2003)
  2. Re: ReplaceFoundItems Problem ( Brian Fries 2003)
  3. Re: ReplaceFoundItems Problem ( Justin Carroll 2003)
  4. Re: ReplaceFoundItems Problem ( John Peacock 2003)
  5. ReplaceFoundItems Problem ( Justin Carroll 2003)
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 ------------------------------------------------------------- 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/ John Peacock

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:

stripping extra spaces from form fields (2000) Problems with [Search] param - Mac Plugin b15 (1997) Search design (1997) Credit Card Number checking (1997) WebCat2b15MacPlugin - showing [math] (1997) Garbage display after 100 records (was WebCatalog usage) (1997) [WebDNA] Emails per hour, [sendmail] BCC's (2010) Checking for WebCatalog Version (2000) Robots fill event log (1997) Fields font size (2003) syntax question, not in online refernce (1997) [protect] and identification (2008) [showif] not working (2003) WebCatalog can't find database (1997) Using Plug-In while running 1.6.1 (1997) Not really WebCat- (1997) Call for Help (2000) [WebDNA] XML error? (2015) Bug Report, maybe (1997) DON'T use old cart file! (1997)