RE: [WebDNA] Grep
This WebDNA talk-list message is from 2009
It keeps the original formatting.
numero = 103979
interpreted = N
texte = Sorry, I should have gave a more complete example. Description1 =3D "25PK DVD+RW 16X 4.7GB " Description2 =3D "BRANDED SPINDLE "So the code works well for removing the extra spaces, but still seems to re=move the + sign. The result I get is Title =3D "25PK DVD RW 16X 4.7GB BRANDED SPINDL=E"-----Original Message-----From: Govinda [mailto:govinda.webdnatalk@gmail.com]Sent: Tuesday, November 10, 2009 10:22 AMTo: talk@webdna.usSubject: Re: [WebDNA] Grep> I have the following code that combines two database fields into one> and removes extra spaces at the same time. But this seems to also> be removing the + (plus symbol) from the data as well, which I don't> want to happen. Example, the data "DVD+RW" becomes "DVD RW". Any> ideas why this might be happening?>> [!]First - Find blank Title fields and fill them in with> 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][/> grep] [grep search=3D *$&replace=3D][Description2][/grep][/> 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 grepengine and webdna's to know why the asterick did not work for finding'zero or instances of', thus my use of the + char.------------Govindagovinda.webdnatalk@gmail.com---------------------------------------------------------This message is sent to you because you are subscribed tothe mailing list
.To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.usold archives: http://dev.webdna.us/TalkListArchive/Bug Reporting: http://forum.webdna.us/eucabb.html?page=3Dtopics&category=3D=288
Associated Messages, from the most recent to the oldest:
Sorry, I should have gave a more complete example. Description1 =3D "25PK DVD+RW 16X 4.7GB " Description2 =3D "BRANDED SPINDLE "So the code works well for removing the extra spaces, but still seems to re=move the + sign. The result I get is Title =3D "25PK DVD RW 16X 4.7GB BRANDED SPINDL=E"-----Original Message-----From: Govinda [mailto:govinda.webdnatalk@gmail.com]Sent: Tuesday, November 10, 2009 10:22 AMTo: talk@webdna.usSubject: Re: [WebDNA] Grep> I have the following code that combines two database fields into one> and removes extra spaces at the same time. But this seems to also> be removing the + (plus symbol) from the data as well, which I don't> want to happen. Example, the data "DVD+RW" becomes "DVD RW". Any> ideas why this might be happening?>> [!]First - Find blank Title fields and fill them in with> 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][/> grep] [grep search=3D *$&replace=3D][Description2][/grep][/> 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 grepengine and webdna's to know why the asterick did not work for finding'zero or instances of', thus my use of the + char.------------Govindagovinda.webdnatalk@gmail.com---------------------------------------------------------This message is sent to you because you are subscribed tothe mailing list .To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.usold archives: http://dev.webdna.us/TalkListArchive/Bug Reporting: http://forum.webdna.us/eucabb.html?page=3Dtopics&category=3D=288
Mark Bergkvist
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:
anyone integrated inventory w/ storebuilder? (2003)
Help with Repost Data msg from form (1997)
searching by date (1998)
WebCat2 as a chat server? (1997)
Encrypt Users.db problem (1998)
Math with Time (1997)
Resume Catalog ? (1997)
includes and cart numbers (1997)
OT: Backup Strategies (2007)
Max Record length restated as maybe bug (1997)
possible, WebCat2.0 and checkboxes-restated (1997)
Requiring that certain fields be completed (1997)
Setting up shop (1997)
AppleShare IP 6.1 (1998)
Verifying and adding new users (1997)
Tax Collection for Different Items (2003)
Sorting Dates in a search (2000)
textarea to page display (1998)
Great product and great job ! (1997)
StoreBuilder/SiteBuilder (2005)