How to split before colon

I need to split the value before colon
For ex: 12/31/2006 work: output should be work
12/31/2006 work load:output should be work load

@sruthesanju

Try below expression:

yourString = β€œ12/31/2006 work load:”

          RequiredString = System.Text.RegularExpressions.Regex.Match(yourString.Split(":"c)(0),"[a-zA-Z]").Value
2 Likes

Hi, To get the outcome before colon, can use β€œSplit” Function as shown in image,
To get outcome after colon can specify the array value as output(1)

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.