As my question illustrates, I am a RegEx beginner. I am trying to set up a survey alert that triggers based on the presence of an exact text string, not the individual words. So in other words 'lower prices' but not just 'lower' or just 'prices'. Seems straight forward but my stab using the syntax below does not work. Thanks in advance for your assistance
/(\\ |^)(lower prices|need more staff)(\\ |[[:punct:]]|$)/
Page 1 / 1
Not sure if it is bad form to answer your own question but I figured this out. The string below seems to work
/(\\ |^)(^greg taco$)|(^allen burrito$)|(^john burger$)(\\ |[[:punct:]]|$)/
/(\\ |^)(^greg taco$)|(^allen burrito$)|(^john burger$)(\\ |[[:punct:]]|$)/
I am pretty sure it is bad form to provide an incorrect answer. The above syntax only works if the comment includes those exact strings and nothing else which is generally not useful. The code below triggers alerts if the strings are present in the comment at all.
/(\\ |^)(^.*greg taco.*$)|(^.*allen burrito.*$)|(^.*john burger.*$)(\\ |[[:punct:]]|$)/
/(\\ |^)(^.*greg taco.*$)|(^.*allen burrito.*$)|(^.*john burger.*$)(\\ |[[:punct:]]|$)/
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.