سؤال

I am checking for a string in SharePoint 2013 SPD workflow using regular expression but it is not working. My condition is:

If Current Item:UserDepartment matches regular expression /\W(technology)\W/i  
   Log Test1 to the workflow history list  
Else  
   Log Test2 to the workflow history list  

And it always prints "Test2". The "UserDepartment" field contains value "Information Technology" and I am trying to check if it contains string "technology" case insensitive using above regular expression.

هل كانت مفيدة؟

المحلول

You could try this regular expression:

(?i)(?<= |^)technology(?= |$)

My test result:

https://regex101.com/r/dpOWuf/1

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى sharepoint.stackexchange
scroll top