RegEx Look Ahead / Look Behind

Hi, Does the NETMF RegEx library support look ahead/behind? I think I have the syntax right here but I get the error:

“Syntax error: Missing operand to closure”

sPacket = "~AA^BB^CC~DD"
string[] cmds = Regex.Split(@ "(?=[~^])", sPacket, RegexOptions.None);

Expected output:

cmds[0] = ~AA
cmds[1] = ^BB
cmds[2] = ^CC
cmds[3] = ~DD

What namespace are you using to get Regex?

EDIT: Nvmd, found it.

Ah the problems with porting code. Looks like the functionality comes from an old java library that didn’t support. So that would be a no. Hum… I guess a better regex library is needed.

If its not native then I’ll just go with my own routine.

Thanks for the find.