Regex for Character

Hi Guys,

I am getting this string “Kerala / 32”. I need only character excluding numbers and special character. Kindly help me out in this.

Thanks & Regards
Gaurav Kumar

Hi @Gaurav_Kumar2

Please use this regex pattern:

  1. Use Matches activity
    Input: Kerala / 32 (or the string variable)
    Pattern: “[A-Za-z]+”
    Result: array (let’s say arrMatches as variable name)

  2. To get Kerala, use arrMatches(0).ToString

Let me know if it works :slight_smile:

1 Like

@Gaurav_Kumar2 - Try this one Regex.Matches(“Kerala / 32”, “[a-z,A-Z]”)

1 Like

try using the following Regex
Find the attached flow for refrence. Worked with your given example.

Hope this would be of help :slightly_smiling_face:

Ashley Nihal Dcunha (11.0 KB)

1 Like

Hi @ashley11

Thanks for your response its working fine when i am having only one one word like “Kerala / 32” so its working fine. and when it comes for “Tamil Nadu / 33” its only getting “Nadu”. Can you help me out in this.

give me a moment. (11.0 KB)

Please check this one :slight_smile:

@Gaurav_Kumar2 (11.4 KB)

Try with this. Please let me know if that worked.


Try this one in Matches


Input = “Kerala / 32”

RequiredString = Input.Split("/".TocharArray)(0)