Re: String manipulation in Webcatalog

This WebDNA talk-list message is from

2001


It keeps the original formatting.
numero = 39069
interpreted = N
texte = Try this...[text multi=T]tStart=0&tEnd=0[/text] [loop start=1&end=[countchars][likenumber][/countchars]] [showif 0![getchars start=[index]&end=[index]][likenumber][/getchars]] [showif [tStart]=0][text]tStart=[index][/text][/showif] [text]tEnd=[index][/text] [/showif] [/loop] [text]newnumber=[!] [/!][getchars start=[tStart]&end=[tEnd]][likenumber][/getchars][!] [/!][/text]- brian At 4:09 PM 10/4/2001, Laeg Ent. wrote: >[grep >search=0+([0-9]+)0+&replace=\1][likenumber][/grep] > >this just gets rid of the initial zeros...... > >0010200 results in 10200 > >--- John Peacock wrote: > Laeg >Ent. wrote: >> > >> > I have a number like 000004567000000 >> > >> > I am unsure how many zeros are before the actual >> > number and unsure how many after. I need to >> extract >> > the number. How do you do this in Webcatalog? Its >> > seems pretty weak on string manipulation. >> > >> >> [math][likenumber]+0[/math] will get you 4567000000 >> (since 0's after >> the number are usually relevant). >> >> or [grep >> search=0+([0-9]+)0+&replace=\1][likenumber][/grep] >> >> will strip all trailing and preceeding zeros, but >> preserve embedded >> zeros. >> >> John >> >> -- >> John Peacock >> Director of Information Research and Technology >> Rowman & Littlefield Publishing Group >> 4720 Boston Way >> Lanham, MD 20706 >> 301-459-3366 x.5010 >> fax 301-429-5747 >> >> >------------------------------------------------------------- >> 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://search.smithmicro.com/ > >____________________________________________________________ >Do You Yahoo!? >Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk >or your free @yahoo.ie address at http://mail.yahoo.ie > >------------------------------------------------------------- >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://search.smithmicro.com/-- <= Brian C. 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://search.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: String manipulation in Webcatalog (Marc M. 2001)
  2. Re: String manipulation in Webcatalog (Marc M. 2001)
  3. Re: String manipulation in Webcatalog (John Peacock 2001)
  4. Re: String manipulation in Webcatalog (Brian Fries 2001)
  5. Re: String manipulation in Webcatalog (Laeg Ent. 2001)
  6. Re: String manipulation in Webcatalog (Laeg Ent. 2001)
  7. Re: String manipulation in Webcatalog (Laeg Ent. 2001)
  8. Re: String manipulation in Webcatalog (Anup Setty 2001)
  9. Re: String manipulation in Webcatalog (John Peacock 2001)
  10. Re: String manipulation in Webcatalog (Anup Setty 2001)
  11. String manipulation in Webcatalog (Laeg Ent. 2001)
Try this...[text multi=T]tStart=0&tEnd=0[/text] [loop start=1&end=[countchars][likenumber][/countchars]] [showif 0![getchars start=[index]&end=[index]][likenumber][/getchars]] [showif [tStart]=0][text]tStart=[index][/text][/showif] [text]tEnd=[index][/text] [/showif] [/loop] [text]newnumber=[!] [/!][getchars start=[tStart]&end=[tEnd]][likenumber][/getchars][!] [/!][/text]- brian At 4:09 PM 10/4/2001, Laeg Ent. wrote: >[grep >search=0+([0-9]+)0+&replace=\1][likenumber][/grep] > >this just gets rid of the initial zeros...... > >0010200 results in 10200 > >--- John Peacock wrote: > Laeg >Ent. wrote: >> > >> > I have a number like 000004567000000 >> > >> > I am unsure how many zeros are before the actual >> > number and unsure how many after. I need to >> extract >> > the number. How do you do this in Webcatalog? Its >> > seems pretty weak on string manipulation. >> > >> >> [math][likenumber]+0[/math] will get you 4567000000 >> (since 0's after >> the number are usually relevant). >> >> or [grep >> search=0+([0-9]+)0+&replace=\1][likenumber][/grep] >> >> will strip all trailing and preceeding zeros, but >> preserve embedded >> zeros. >> >> John >> >> -- >> John Peacock >> Director of Information Research and Technology >> Rowman & Littlefield Publishing Group >> 4720 Boston Way >> Lanham, MD 20706 >> 301-459-3366 x.5010 >> fax 301-429-5747 >> >> >------------------------------------------------------------- >> 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://search.smithmicro.com/ > >____________________________________________________________ >Do You Yahoo!? >Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk >or your free @yahoo.ie address at http://mail.yahoo.ie > >------------------------------------------------------------- >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://search.smithmicro.com/-- <= Brian C. 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://search.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:

WC 2.0 frames feature (1997) expired beta (1997) Not seeing cart info on Invoice.tmpl (was PROBLEM) (1997) European dates (1998) financial calculation (2000) NT - Thanks and Taxes (1997) Search results templates (1996) Emailer (WebCat2) (1997) [WebDNA] Google like search (2016) Separate server for jpg/gif files (1998) contextual shownext (1998) searchable list archive (1997) exact word search (1998) How do I pass [cart] when user clicks back (2000) WebCatalog 2.0 b 15 mac (1997) Validation (2000) random random links (1999) Nested tags count question (1997) WebCat & WebTen (1997) WebDNA performance comparisons? (2004)