Split String on character ':'

Want just to retrieve only pwd from below text in a variable:

Generated password for user: a(bC1]iA

this generated pwd can be of any length or any sort of alphanumeric

@anjasing

try →

Password= new System.Net.NetworkCredential(string.Empty, Input_Password_Variable).Password
1 Like

HI,

How about the following?

System.Text.RegularExpressions.Regex.Match(yourString,"(?<=user:\s+)\S.*").Value

Regards,

1 Like

strVar.Split(":"c)(1).Trim

1 Like

Thank you so much :slight_smile:

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