How to use substring to split value from IndexOf


#1

Can someone help me to extract only ‘UnexpectedCountMuleServiceActive’ from below String,
Event Code: UnexpectedCountMuleServiceActive

I used
writefile.Substring(writefile.IndexOf(“Event Code”)+13,45).Split(“x”.ToCharArray)(0)


#2

@NagaSujitha Use split method with respect to “:” like below

String newvariable=split(UrStringVariable,":")(1)


#3

Assign v1 = Event Code: UnexpectedCountMuleServiceActive

Assign v1 = v1.Split(":".ToCharArray)(1)