How to determine the activity name for a input to be string?


I need to find out a activity to determine string input


Well you mean “string that means all letters” or ?


Yes…I meant…any string…it may be a sentence, or a phrase or even a few letters…


Only letters:
Regex.IsMatch(input, @"^[a-zA-Z]+$");

Only letters and numbers:
Regex.IsMatch(input, @"^[a-zA-Z0-9]+$");

Only letters, numbers and underscore:
Regex.IsMatch(input, @"^[a-zA-Z0-9_]+$");

Set regular expression condition

I need to check it without using regex


Well i am just assuming if you mean "string that means all letters

your_variable_storing_input_box_output.ToString.All(function© Char.IsLetter©).ToString

// well if string is like “RandomeString” it will return True because all are letters but if you will try like this “test 12” it will return false.



thnks a lt…let me try once


It`s working for say “working” but returning false for “its working”

Is there any options?


Where can I put this function directly e.g. Regex.IsMatch(input, @"^[a-zA-Z]+$")
I inserted an activity Is Match where I could type your Regex. And after that an If activity checked the output. Is there an easier way?

Thank you!


try this:

var.All(function(x) char.IsLetter(x) or x = " " or x = "." or x =",").ToString


In assign statement.

bool var = Regex.IsMatch(input, @"^[a-zA-Z]+$")

See its properties in the right side having a “patter property” just enter their like this “^[a-zA-Z]+$”.

Well both way it will return output in boolean so you can direct use it in if statement Regex.IsMatch(input, “^[a-zA-Z]+$”)



Do you have any idea what could be the problem with the below Assign statement (testResult is bool variable)?

Could it be the problem that the System.Text.RegularExpressions namespace is not on Imports panel (as it is in Visual Studio C#)

Thank you!


Yes might be jusr import it if you have not otherwise use like this System.Text.RegularExpressions.Regex.IsMatch(input, “^[a-zA-Z]+$”)

but it is better to import the namespace.

and please remove this @ from that pattern.


Thank you! Last question about regex. The @ sign stands for what? In the above examples somewhere it was used, but in my project UiPath doesn’t accept @ sign at all.


thnaks a ton…it works


Hey @UiJules

@ is a verbatim string literal.
Verbatim strings start with @ symbol and end with the matching quote. The C# compiler understand this type of string as verbatim string. the @ symbol tells the string constructor to ignore escape characters and line breaks.

Well for your understanding:


is same as:


To get it more about it, check it out this link. Will be helpful for you: Link



Oh, I see the point. In case of Regex, do you use the verbatim string to the Regex pattern or to the string that will be verified by the Regex.

Anyway, It was used in the below example, but it throw an error for me.
bool var = Regex.IsMatch(input, @"^[a-zA-Z]+$")

Thank you again for your replies.


VB string literals are very similar to C-style verbatim ones, so there is no special symbol to indicate this; you just use regular strings and don’t have to escape backslashes. By the way, the “IsMatch” function is also available as a UiPath activity, along with Match and Replace. I prefer to use these because they allow you to easily modify the regex options, like case sensitivity and single line/multi line modes.