When I try to match using regular expression using:

admin\/remaining-pairs\/\d*\/\d*\/\d*\/\d*done

I get this error:

preg_match(): Unknown modifier 'r' in rules_data_text_comparison() (line 423...

/admin\/remaining-pairs\/\d*\/\d*\/\d*\/\d*done/

I have tried with and with "/" as delimiters at the beginning and end and also with "/g" at the end.

The regex expression seems to work on validating sites I have used, including http://gskinner.com/RegExr/ which is linked to from the rules page.

What changes do I need to make for this to work in rules?

Thanks.

Comments

jsibley created an issue. See original summary.

jsibley’s picture

So, this doesn't give an error and should be equivalent to the above, if I understand correctly:

/admin/remaining-pairs/[0-9]*/[0-9]*/[0-9]*/done/

However, it doesn't match the path below:

mysite/admin/remaining-pairs/5/6/24/done

Any ideas?

margyly’s picture

I can't get this to work in a Rules condition either.

TR’s picture

Version: 7.x-2.9 » 7.x-2.x-dev
Status: Active » Postponed (maintainer needs more info)

Simplify your Rule, export it, post it here, and we'll try to make it work for you.

TR’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

If you continue to have a problem with regular expressions, please provide the information in #4.