Hi,
I’m retrieving a value from a data table and would like to check if the variable starts with either “LD” or “ld”. What is the best approach here?
Thanks!
BR/Mikko
Hi,
I’m retrieving a value from a data table and would like to check if the variable starts with either “LD” or “ld”. What is the best approach here?
Thanks!
BR/Mikko
Try with contains function in IF condition.
Eg: DataTable Variable.Contains(“LD”) or DataTable Variable.Contains(“ID”)
Try this in condition of If activity : Str.Startwith(“LD”) Or Str.Startwith(“id”)
Try like this
_stringVarible.StartsWith(“LD”) or _stringVarible.StartsWith(“id”)
Or try with
Regex.Match(yourstring,“^(LD|ld)”).Success
in your if condition.
Hi,
If you want to judge not only “LD” and “ld” but also “Ld” and “lD” as true, you can use the following sentence.
stringValue.ToUpper.StartsWith("LD")
or
System.Text.RegularExpressions.Regex.IsMatch(stringValue,"^LD",RegexOptions.IgnoreCase)
Regards,
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.