In the following Event Procedure, using the above requirement as an example, for the current model event 0xabcd0000 is associated with, the Event Procedure will take the input varbind 4 (U 4), apply a regular expression looking for the characters between the dots(.) (as in an ip address) and save the result to a new varbind 20 (U 20) and pass all the varbind variables including the new varbind 20 to new event 0xabcd0001.
0xabcd0000 E 50 P " \
CreateEventWithAttributes( \
{ C CURRENT_MODEL }, \
{ H 0xabcd0001 }, \
SetEventAttribute( \
GetEventAttributeList(), \
{ U 20 }, \
GetRegexp( GetEventAttribute( { U 4 } ), \
{ S \".*?:.*?:(.*)\" }, \
{ U 1 } ) \
) \
)"