I want to get string after colon from string variable

I have a variable string a=“1fgjfsjjh edth dfh oidafjsgio NO : AE00165782”.

I want get value after colon.

output : AE00165782

2 Likes

Hi
Welcome to uipath community
This expression would help on this
str_output = Split(str_input,”:”)(1).ToString.Trim

Cheers @Ajith1

2 Likes

Hi Ajith,

You can use string manipulation
Ex String.Split(":") you can use this function
:slight_smile:

1 Like

Assign activity, strOutput = a.SubString(a.IndexOf(":") + 1)

Regards,
Karthik Byggari

5 Likes

Hi @Ajith1

You can use regex expression with IsMatch activity

(?<=NO :).*

Thanks
Ashwin S

Hi Ajith,

Welcome to community.

You can also try a.Substring(34) in a variable or in a assign activity
cheers @Ajith1

Thank you all I got answer from @Palaniyappan

And I will try another answers.

Thanks
Ajith

2 Likes

@Ajith1
You can try this expression:
use assign activity

a= “1fgjfsjjh edth dfh oidafjsgio NO : AE00165782”

output = a.Split(":"c)(1).ToString.Trim

Thanks!

2 Likes

its working

Thanks @suruchi120294

2 Likes

@Ajith1
Mark as solution for which u have got answers for to close the topic.
Thanks!

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