Regular Expression Help 2

dpflagg
07-20-2003, 01:29 AM
I'm having a regular expression issue that I need some help with. I have a string which looks something like this

"25 A 24 A AA A 99 A CC"

I need to take the 2 character elements and put them into an array, and each 2 character code is separated by " A " (i.e., space A space). I have been using the Regex.Split function as follows:

Dim strReadBytes() As String = Regex.Split(strTemp, " A ")

but I came across the above string which has an "AA" 2 character code, and instead of getting "AA" as an element in the array, I got:

"AA A 99"

What is happening and how can I fix it?

Thanks!

phinds
07-20-2003, 07:31 AM
you could just split on the blank char and toss every other element in the resulting array

Squirm
07-20-2003, 07:36 AM
Please post your VB.Net questions at www.dotnetforums.net

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum