View Single Post
Old Sep 11th, 2005, 10:10 AM   #2
brokenhope
Hobbyist Programmer
 
Join Date: Apr 2005
Posts: 126
Rep Power: 4 brokenhope is on a distinguished road
Got it working finally, I was way off. There was a lot of problems when there was nothing to fill the array with to, because when array(2) or something was called the program would crash because it doesnt exist, it was never filled in the split if the user entered an invalid pattern, so I finally had to ReDim it, and put a max size in the beginning, anyways heres what worked:

Dim stFileFormat(2) As String
stFileFormat = Regex.Split(formFileNew.txtFileFormat.Text, "([a-zA-Z0-9]*)\s\((.*)\)")
ReDim Preserve stFileFormat(2)
brokenhope is offline   Reply With Quote