I am using Regex to capture a value from an output, the output may or may not have ‘self’ in it.
When it does contain ‘self’ there are no issues however when there is no ‘self’ the output is empty.
When writing that value into a datatable I get the error
To solve this I am looking to have an IF statement
MyVariable.ToString.Contains(“self”)
Then… continue
Else
Log Message (all working)
Assign
The assign part is where I would like to assign a value to the MyVariable so there is a value instead of being empty.
I changed the MyVariable.ToString = but I am not sure how to assign a value it.
Or I was wondering if I could reassign the original regex IEnumerable variable to another IEnumberable value.
Thanks for that, apologies as I may not have explained it well.
The condition I have is working, its the ‘else part’ I would like to assign a new variable to that empty field.
The variable contactMatch is an IEnumerable. I was trying to assign an alternate value so it wasnt empty