Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: Re: javascript digest: April 12, 2001


Message #1 by jon stephens <zontar@m...> on Thu, 12 Apr 2001 18:56:54 -0700
Thanks, Jon, for the example. I now also understand how to access the array
returned by the split method!

-----Original Message-----
From: jon stephens [mailto:zontar@m...]
Sent: Thursday, April 12, 2001 7:01 PM
To: javascript
Subject: [javascript] Re: javascript digest: April 12, 2001


Oops, I was a little quick on the Send button, my suggestion should have
read:

var myStrParts = myStr.split(" / ");
var rightTwoThirds = myStrParts[1] + " / " + parts[2];

assuming that you wanted to get rid of the leading space.

sorry about that!

j.

> Subject: Locate String Within a String
> From: rg1@h...
> Date: Thu, 12 Apr 2001 19:39:28
> X-Message-Number: 12
> 
> Hi.
> 
> I have a JavaScript function that needs to locate everything to the right 
> of the first "/" within a string.
> 
> e.g. myStr = "12345 / ritag / 54321".
> 
> I need to extract "ritag / 54321"
> 
> Could somebody please give me an example of code to accomplish this?
> 
> TIA.
> 
> Rita


-- 
----------------------------------------
             jon stephens
       email: zontar@m...
   meatspace: somewhere.in.tempe.az.us
         voice: +1.480.968.4214
       voice mail: +1.480.968.2506
----------------------------------------
----------------------------------------
     Web Builders: What's The Buzz?
        http://buzz.builder.com/
----------------------------------------

  Return to Index