Segment string into array, regex?
- by Hanpan
I have a string which looks like this:
"[segment1][segment2][segment2]"
What I'd like is to be able to split the string into an array, so I'd end up with:
Array[0] = "segment1", Array[1] = "segment2", Array[2] = "segment3"
I've tried using the string split function, but it doesn't seem to do exactly what I want. I was wondering if anyone has some regex which might help me out?
Thanks in advance