Need to parse a string in Javascript

Blocked Profile - Jun 12, 2013 at 11:26 AM
 Blocked Profile - Jun 12, 2013 at 12:27 PM
Hey thanks for all your efforts before hand, your help is greatly appreciated as it allows me to work on my project in parallel, as opposed to serially!

I need a javascript code that finds a single string like "4110\300", and parse into two seperate variables.

I am certain this is a quick method/function but I have not the time to go and find my other solutions that have this in it. I think it is substring.

1 response

Blocked Profile
Jun 12, 2013 at 12:27 PM
Well, I wrote it myself...thanks for the help...

var thevalveis=tagpart(found);

for (var ti=1;ti<thevalveis.length;ti++) {
if (thevalveis.substring(ti,ti+1)=='|') {
var thenewvalve=thevalveis.substring(0,ti);
var thenewcost=thevalveis.substring(ti+1,thevalveis.length);