Don't forget that spacing is important, so, not knowing python that
well, I wonder if you need to do:
import re
if evt.summary.find(';') >= 0:
evt.summary = re.sub('["].*["]', ' "" ', evt.summary)
--
James Pulver
Information Technology Area Supervisor
LEPP Computer Group
Cornell University
guyverix wrote, On 7/31/2009 5:12 AM:
> I am attempting to do a string split for an event transform, and am not
> having much luck. Any suggestions on how to split a sting on a semicolon and
> drop everything after it?
>
> This was my last try (I dont know python, just mangling code I find in the
> forums)
>
>
> Code:
>
> import re
> if evt.summary.find(';') >= 0:evt.summary = re.sub('["].*["]', ' "" ',
> evt.summary)
>
>
>
>
>
>
>
> -------------------- m2f --------------------
>
> Read this topic online here:
> http://forums.zenoss.com/viewtopic.php?p=37490#37490
>
> -------------------- m2f --------------------
>
>
>
> _______________________________________________
> zenoss-users mailing list
> [email protected]
> http://lists.zenoss.org/mailman/listinfo/zenoss-users
_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users