User Kent Anderson (firstname.lastname@example.org) posted:
Unfortunately regex is not my strong suit.
needs to be able to look for a couple of word in the phrase found in the
drop down menu.
Courtyard View is the value that I need to find but to make the selection as
generic as possible it needs to ignore all extraneous stuff in the
ie: Radisson Resort - Disney - Courtyard View in Orlando
All I want is for it to recognize the Courtyard View or Pool View etc and
ignore the rest. Is that possible?
The information is stored in an associative array and dumped into the
variable called value. Is there any
way to use regex?
User Asim Zafar (email@example.com) posted:
Hi there, i dont think using regular expression will work here... why
dont you traverse through all the
values one by one and while doing it check that whether or not the
'KeyWord' is there in the pulled
string by using
if( (index(value, "Pool View") > 0) | | (index(value, "Courtyard View") >
Hope this helps
Kent Anderson wrote:
If there is no pattern in your list item, regex is not gonna help.
One thing about the TSL functions is many of them return an error code indicating whether the operation is successful or not. You can assess the error code to determine whether a list_item exists.
rc = list_select_item(list, item)
if(rc == E_OK)
fFound = TRUE;
fFound = FALSE;