Closed (fixed)
Project:
Rules
Version:
6.x-1.3
Component:
Rules Engine
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
20 Sep 2010 at 18:44 UTC
Updated:
5 Oct 2010 at 01:00 UTC
This post relates to my post here http://groups.drupal.org/node/94214
Basically, I wish to know whether regular expressions and tokens can be placed directly into a rules field when doing a textual comparison. That is, can I drop a token into field 1: [node:sell price] and a regular expression into field 2: (0-3)(0-9)? The idea here would be to trigger the rule when the sell price is between 0 and 39.
Comments
Comment #1
mitchell commentedYes, absolutely. Textual comparison includes an optional checkbox near the second comparison field to use regex instead of plain text. There's also a tool in the help note for checking/constructing your regex pattern, and the rules debug feature is also helpful for checking that each part runs smoothly.
Please reopen if that info doesn't help get you through the configuration.
Comment #2
melchoir55 commentedThis is funny. I went back thinking "how could I miss that" and found no such box. Then I realized I had selected "numeric comparison" rather than "textual comparison". duh.
Thanks for the help.
Comment #3
melchoir55 commentedaccidental double post
I'll use this to point out that the regex build helper is insanely helpful.
Comment #4
mitchell commentedGlad to hear, melchoir55!