I'm trying to split these into tokens and it's mostly there. I really want to split the primary tokens up like NIGHT, set, the xpath pattern, the value to assign to the xpath pattern, i.e. in the second one, 'high' and in the second one, 'taken-offline' and the '-' and '+'.
NIGHT.set('.//idmef:Source[1]','+')
NIGHT.set('.//idmef:Assessment/idmef:Impact/@severity', 'high')
NIGHT.set('/idmef:IDMEF-Message/idmef:Alert/idmef:Source[1]/@ident', 'taken-offline', '-')
They are expressions which map XML to a specific pattern state. But when I run the following regexp on them, I still seem to leave these in.
public static string[] Tokenize(string ActionItem)
{
Regex RE = new Regex(@"([(\.\//\s\;\,\:\.\)]+)");
return (RE.Split(ActionItem));
}
When I run it, I get the following:
NIGHT
.
set
(
'
.//
idmef
:
Assessment
/
idmef
:
Impact
/
@severity'
,
'high'
)
NIGHT
.
set
(
'
.//
idmef
:
Source[1]'
,
'+'
)
NIGHT
.
set
(
'
/
idmef
:
IDMEF-Message
/
idmef
:
Alert
/
idmef
:
Source[1]
/
@ident'
,
'taken-offline'
,
'-'
Its that ', I don't know what you call it, single quotation mark, it is still being left in.
What am I doing wrong?