RSA Admin

Does anyone have knowledge of using REGEX in the XML

Discussion created by RSA Admin Employee on Jun 11, 2008
Latest reply on Jun 11, 2008 by RSA Admin

I'm trying to use regex in an XML that will skip 50 chars/spaces in a log message. The regex I have working looks like this: /(?<=-4:smileyhappy:(.{50})/ on the log sample shown in my XML. I have tried the following in my XML without any success, the syntax error from IE is here:

The character '<' cannot be used in an attribute value. Error processing resource 'file:///E:/nic/3700/ENV01-DS1/etc/device...

  expr="<parm1>(?<=-4:smileyhappy:(.{50})"
-------^

  

Here is the code snippet from my XML:

 

<!--
Log sample
May 05 15:43:19 [10.220.196.141]%GENERIC_FILEREADER-4: 8hkfSFw6Qy0 20080505 093010 102 NET I CONN_IND (9822) incoming connection indication [src_add="127.0.0.1/46353",dest_add="127.0.0.1/54964"]
-->

<HEADER
id1="0001"
id2="0001"
content="%GENERIC_FILEREADER-4: &lt;messageid&gt; &lt;!payload:messageid&gt; "
/>

<REGEX
name="skipchars"
parms="parm1"
default="$NONE"
expr="(?<=-4:smileyhappy:(.{50})"
/>

<MESSAGE
level="7"
parse="1"
parsedefvalue="1"
tableid="15"
id1="000001"
id2="8hkfSFw6Qy0"
eventcategory="1901000000"
content="&lt;skipchars&gt; NET &lt;msgdata&gt;"
/>

Outcomes