This should suffice as a regex pattern: \s{0,}\"{0,}YES\"{0,}(,|$)
It ensures the entire cell content is YES, so "YESTERDAY" wouldn't match, and it also discards any leading spaces or if it is surrounded by quotation marks that some CSV formats will throw in there. Keep in mind it'll match if a column is called "YES" as well, so it might be wise to trim the header line off before running this.
Personally, I'd shoot for a more reusable option; you could create an action that takes a collection and searches for any values. With a code stage you'd be able to iterate over all of the fields in the collection and make sure it's a proper match as opposed to a regex search.
------------------------------
Nicholas Zejdlik
RPA Developer
------------------------------
Original Message:
Sent: 01-18-2021 06:58
From: Vrat Himbo
Subject: Regex pattern
Hi all,
i've a collection field with dynamic column name but always with ONE row.
I need to check if this row contains at least one "YES" value.
I didn't want to loop through each collection, so my idea is to use:
1) Get collection as CSV (in that case i have one text data item with all values separated by a comma) but now, how can i check if at least one value after comma (,) is YES?
Can i use a regex pattern?
Thanks in advance
------------------------------
Vrat Himbo
------------------------------