Re: [WebDNA] Grep
This WebDNA talk-list message is from 2009
It keeps the original formatting.
numero = 103978
interpreted = N
texte = > I have the following code that combines two database fields into one =20=> and removes extra spaces at the same time. But this seems to also =20> be removing the + (plus symbol) from the data as well, which I don't =20=> want to happen. Example, the data =93DVD+RW=94 becomes =93DVD RW=94. =Any =20> ideas why this might be happening?>> [!]First - Find blank Title fields and fill them in with =20> Description1 and Description2 (using grep to remove extra spaces)[/!]> [Search db=3Dprice2.txt&eqTitledata=3D[blank]][numfound]> [ReplaceFoundItems]Title=3D[grep search=3D =*$&replace=3D][Description1][/=20> grep] [grep search=3D *$&replace=3D][Description2][/grep][/=20> ReplaceFoundItems]> [/Search]This worked for me: (removes all spaces and leaves plus signs intact.[grep search=3D[URL][ ]+[/URL]&replace=3D]DVD + RW[/grep](I don't know enough about the differences between BBedit's grep =20engine and webdna's to know why the asterick did not work for finding =20='zero or instances of', thus my use of the + char.------------Govindagovinda.webdnatalk@gmail.com
Associated Messages, from the most recent to the oldest:
> I have the following code that combines two database fields into one =20=> and removes extra spaces at the same time. But this seems to also =20> be removing the + (plus symbol) from the data as well, which I don't =20=> want to happen. Example, the data =93DVD+RW=94 becomes =93DVD RW=94. =Any =20> ideas why this might be happening?>>
[!]First - Find blank Title fields and fill them in with =20> Description1 and Description2 (using grep to remove extra spaces)[/!]> [Search db=3Dprice2.txt&eqTitledata=3D[blank]][numfound]>
[replacefounditems]Title=3D[grep search=3D =*$&replace=3D][Description1][/=20> grep] [grep search=3D *$&replace=3D][Description2][/grep][/=20> ReplaceFoundItems]> [/Search]This worked for me: (removes all spaces and leaves plus signs intact.[grep search=3D
[url][ ]+[/URL]&replace=3D]DVD + RW[/grep](I don't know enough about the differences between BBedit's grep =20engine and webdna's to know why the asterick did not work for finding =20='zero or instances of', thus my use of the + char.------------Govindagovinda.webdnatalk@gmail.com
Govinda
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:
Color options for items (1999)
Hosts who have upgraded to v5.0? (2003)
[protect] on NT? (1997)
RE: type 2 errors with ssl server (1997)
Date problems-more (1997)
test (2003)
Ok here is a question? (1997)
emailer 150 (1997)
founditems / writefile (2005)
Running 2 two WebCatalog.acgi's (1996)
Banners (1997)
Generating Report Totals (1997)
Somewhat OT: IE issues (2002)
Up and running ... at last !! (1997)
Multiple Form Fields (2000)
emailer (1997)
Formating found categories (1997)
Signal Raised (1997)
Frames and WebCat (1997)
using showpage and showcart commands (1996)