Skip to main content
InSource Solutions

TN AppSvr107 .Net string function "Split" to separate strings in script

insource logo large.jpg

                           Tech Note                    



The following script is an example of how the .net string function "split" can be used in the ArchestrA scripting environment to split a string and allow action to be take on the result:


  • Author: Joe Hefner
  • Published: 10/14/2014
  • Applies to: Application Server 3.1 and Higher






The script above can be copied from below if desired:


Dim value as System.string;
dim words[9] as System.string;
dim separators[1] as System.string;
dim s as System.string;

separators[1] = ",";

value = "403149,1149696,4kk-INT#47,2014/08/12@06:21:13,60,54332A,0,00000,17";

words = value.Split(separators, System.StringSplitOptions.RemoveEmptyEntries);

for each s in words[]
  logmessage (s);

Confirmation of Success

see message log in SMC