...

View Full Version : Splitting arrays with sentences



saljb
06-01-2005, 09:31 PM
I have an array I want to split. This is the code I am currently using:



<%
dim aSelected
aSelected = split(request.form("option"),",")
for i = 0 to ubound(aSelected)
response.write (aSelected(i) & ("<br>"))
next
%>


This splits the array no problem. The problem I have is that the different variables (if thats the word to use?) the array is holding is sentences that contain commas in themselves. So the split is splitting my sentences. How can I split the variables at the end of the sentences. (some sentences have periods some don't so I can't use the ".")

I read somewhere about the 'mid' function and 'mid' statement. If that is the solution can some one show me an example of how I would do it.

saljb
06-01-2005, 10:34 PM
I also just noticed there are sentences like this:

Recessed medicine cabinet in vanity end wall, 16" x 24" with mirrored door, wood frame to match vanity and two shelves (installed)

That are stop showing the rest of the sentence after the 16. I am guessing its because of the quote. But that is part of the senetnce since it describes measurement. So how can I solve this issue and most importantly the first one mentioned in the first thread.

SpirtOfGrandeur
06-01-2005, 10:46 PM
You might want to post this in the ASP forum...



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum