Hello
I have this String includes text and numbers
I want to get only the text
How can I do that ?
Hi @mironb
([A-Z])\w+
System.Text.RegularExpressions.Regex.Match(Input.ToString,"([A-Z])\w+").Value
Hope this helps!!
Hi @mironb
Two ways i suggest:
Using Split Method:
myString.Split("-"c)(0)
or Regex Method:
System.Text.RegularExpressions.Regex.Match(mystring, "[a-zA-Z]", RegexOptions.IgnoreCase).Value
Regards!
Hi,
How about the following?
System.Text.RegularExpressions.Regex.Match(Input.ToString,"[A-Za-z]+").Value
Regards,
Thank you very much it is working fine
1 Like
Hi @mironb,
If you want to extract any text value in a string you can use Regex in an assign activity like this,
strExtractedText = System.Text.RegularExpressions.Regex.Match(strInputText , "[a-zA-Z]+").Value
If you text is always in the provided format use also use split based on the structure of your string
strExtractedText = Split(" ", strInputText)(0).ToString
Cheers
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.