int openBracket = 0;
int closeBracket = 0;
ArrayList subs = new ArrayList();
//you'll want to use a loop here to check
//if there are no more matches
//gets indexes
openBracket = str.IndexOf("[", openBracket);
closeBracket = str.IndexOf("]", openBracket);
//add substring
//i think you need the + 1 to include the ']'
subs.add(str.substring(openBracket, closeBracket - openBracket + 1));
//resets position
openBracket = closeBracket;
dickersonka
Veteran Poster
1,175 posts since Aug 2008
Reputation Points: 130
Solved Threads: 143