I have a quick question in regards to using .Contains(). I'm writing an if statement and need to update a text field if it contains "VA". However, if it contains "IVA" it shouldn't update this field. What would be the best way to make sure I capture anything with "VA" except for "IVA"?
1 Answer
You could do this with regex but a simple solution is:
if (myString.contains('VA') && !myString.contains('IVA')) { ... do field update } - thank you! knew it was something simple but couldn't figure it out lolverycold– verycold2020-12-17 19:43:26 +00:00Commented Dec 17, 2020 at 19:43
abcVALUE-- match or no match?iVALUE