Link to home
Start Free TrialLog in
Avatar of hankknight
hankknightFlag for Canada

asked on

ASP.NET/VB: Remove rubbish when splitting array from string

In this example, the array contains rubbish:
yz[]=1&
yz[]=2&
yz[]=3&world

Open in new window

I want the array to only contains this:
1
2
3

Open in new window

<%@ Page Language="VB"%>
<%

Dim xyz As Array = "hello?xyz[]=1&xyz[]=2&xyz[]=3&world".split("xyz[]")

For index = 1 To xyz.GetUpperBound(0)
    HttpContext.Current.Response.Write(xyz(index))
    HttpContext.Current.Response.Write("<br>")
Next 

%>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Shaun Kline
Shaun Kline
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial