RE: strip .0 off off IPaddress

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 22168
interpreted = N
texte = Here's the correct code[math][GetChars start=1&end=3][IPAddress][/GetChars][/math].[math][GetChars start=5&end=7][IPAddress][/GetChars][/math].[math][GetChars start=9&end=11][IPAddress][/GetChars][/math].[math][GetChars start=13&end=15][IPAddress][/GetChars][/math]The version below was missing a few spaces, ampersands, numbers, and end / tags.Aloha, Olin> -----Original Message----- > From: The Mooseman [mailto:frederick@mooseweb.com] > Sent: Thursday, December 31, 1998 1:14 PM > To: WebDNA-Talk@smithmicro.com > Subject: RE: strip .0 off off IPaddress > > > >Can you post the code you're using? Your example IP number works fine for > >me with the code that I posted earlier... > > Here it is: > > > [math][GetCharsstart1end3][IPAddress][GetChars][math].[math][GetCh > arsstart=5&end > =7][IPAddress][/GetChars][math].[math][GetCharsstart=9&end=11][IPA > ddress][/GetCh > ars][math].[math][GetCharsstart=13&end=15][IPAddress][/GetChars][/math] > > > Moosenaround > > > >>I used this string as if it were the context [ipaddress] > >>and it only returned the first number. > >> > >>The ip was 123.045.678.981 and > >>after it only returned > >>123. > >> > >>What am I missing? > >> > >>Happy New Year Ya'll!! > >> > >>Mooseman > >> > >> > >>I'm not sure exactly what you are asking, but this technique should work > >>>for all addresses. Basicly what it does is grab each 3-digit > chunk with > >>>[GetChars], and then [math] converts that string into a > number, which has > >>>the effect of removing any extraneous leading zeros. It won't > remove any > >>>zeros that are significant (i.e. non-leading) > > > > > >o--------------- Dave MacLeay --+ > >o----------- Digital Frontier --+ > >o--------------- 802.253.8612 --+ > >o--- dave@digitalfrontier.com --+ > > > > > Associated Messages, from the most recent to the oldest:

    
  1. RE: strip .0 off off IPaddress (Olin Lagon 1998)
  2. RE: strip .0 off off IPaddress (The Mooseman 1999)
  3. RE: strip .0 off off IPaddress (Dave MacLeay 1999)
  4. RE: strip .0 off off IPaddress (The Mooseman 1998)
  5. RE: strip .0 off off IPaddress (Dave MacLeay 1999)
  6. Re: strip .0 off off IPaddress (Kenneth Grome 1998)
  7. RE: strip .0 off off IPaddress (Olin Lagon 1998)
  8. Re: strip .0 off off IPaddress (Dave MacLeay 1998)
Here's the correct code[math][GetChars start=1&end=3][ipaddress][/GetChars][/math].[math][GetChars start=5&end=7][ipaddress][/GetChars][/math].[math][GetChars start=9&end=11][ipaddress][/GetChars][/math].[math][GetChars start=13&end=15][ipaddress][/GetChars][/math]The version below was missing a few spaces, ampersands, numbers, and end / tags.Aloha, Olin> -----Original Message----- > From: The Mooseman [mailto:frederick@mooseweb.com] > Sent: Thursday, December 31, 1998 1:14 PM > To: WebDNA-Talk@smithmicro.com > Subject: RE: strip .0 off off IPaddress > > > >Can you post the code you're using? Your example IP number works fine for > >me with the code that I posted earlier... > > Here it is: > > > [math][GetCharsstart1end3][ipaddress][getchars][math].[math][GetCh > arsstart=5&end > =7][ipaddress][/GetChars][math].[math][GetCharsstart=9&end=11][IPA > ddress][/GetCh > ars][math].[math][GetCharsstart=13&end=15][ipaddress][/GetChars][/math] > > > Moosenaround > > > >>I used this string as if it were the context [ipaddress] > >>and it only returned the first number. > >> > >>The ip was 123.045.678.981 and > >>after it only returned > >>123. > >> > >>What am I missing? > >> > >>Happy New Year Ya'll!! > >> > >>Mooseman > >> > >> > >>I'm not sure exactly what you are asking, but this technique should work > >>>for all addresses. Basicly what it does is grab each 3-digit > chunk with > >>>[getchars], and then [math] converts that string into a > number, which has > >>>the effect of removing any extraneous leading zeros. It won't > remove any > >>>zeros that are significant (i.e. non-leading) > > > > > >o--------------- Dave MacLeay --+ > >o----------- Digital Frontier --+ > >o--------------- 802.253.8612 --+ > >o--- dave@digitalfrontier.com --+ > > > > > Olin Lagon

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:

More questions about serial number dishing (1997) - selectable size to an ecommerce app? (2000) wierd [cart] action! (1997) WebCat2 Append problem (B14Macacgi) (1997) Updating Prices db (still not working) (1999) Separate server for jpg/gif files (1998) RE: Webcatalog and CyberSTUD (1998) getchars broken? (1997) [WebDNA] Apple nixes Mac OS Server ("websites") and other services (2018) Grep issue (2003) Problem displaying search result (1997) speed of TCPConnect? (1998) Sort Order on a page search (1997) WebCatalog Plug-in for Webstar. (1997) [WebDNA] [listwords] and [index] (2009) Date search - yes or no (1997) taxTotal, grandTotal (1997) Replace Statement (1997) interesting (2003) Getting Emailer to send mail (1997)