Hi,
i want to use Contains Sometimes there will be special characters.
example
“SubjectLCM-S”
“Subject:LCM-S”
My Flow not working
Hi,
i want to use Contains Sometimes there will be special characters.
example
“SubjectLCM-S”
“Subject:LCM-S”
My Flow not working
Hi @punnipah
Try with this expression
if(System.Text.RegularExpressions.Regex.Replace(Currentitem.Subject.Tostring,"\W","").Contains("SubjectLCMS"),"S")
Regards
Gokul
maybe the Code retrieval can better be setup with a regex:
strPattern = "(?<=Subject:?LCM-)\w+\b"
strCode = System.Text.RegularExpressions.Regex.Match(strTextVar, strPattern).Value
with an evaluation of the retrurned string also the default case code can be handled
[CheatSheet] - System.Text.RegularExpressions | RegEx - News / Tutorials - UiPath Community Forum
Hi,
In this case, it might be better to use Strings.Right and String.IndexOf or regex instead of String.Contains, as the following.
Strings.Right(CurrentItem.Subject,CurrentItem.Subjet.Length-CurrentItem.Subject.IndexOf("-")-1)
OR
System.Text.RegularExpressions.Regex.Match(CurrentItem.Subject,"(?<=-).*").Value
These return characters after “-”
Regards,
Thank you very much
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.