# Escape "=" (equals) operator in notification apply rule

**URL:** <https://community.icinga.com/t/escape-equals-operator-in-notification-apply-rule/8471>\
**Category:** Icinga 2\
**Tags:** apply-rules, notifications\
**Created:** [October 19, 2021, 7:30am UTC](https://community.icinga.com/t/escape-equals-operator-in-notification-apply-rule/8471 "2021-10-19T07:30:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Heilig](https://community.icinga.com/letter_avatar_proxy/v4/letter/h/ba8739/32.png) [@Heilig](https://community.icinga.com/u/Heilig)\
**Post date:** [October 19, 2021, 7:30am UTC](https://community.icinga.com/t/escape-equals-operator-in-notification-apply-rule/8471/1 "2021-10-19T07:30:27Z")

</div>

Notification Apply Rules has this note:  
\*Please use wildcards and the **= (equals) operator when searching for partial string matches**, like in _.example.com_  
I would like to use a string which contains “=” character in a notification apply rule (e.g. send notifications if a service has “tags” custom variable with “iftype=prod” value). An example:

 ![image](https://community.icinga.com/uploads/default/original/2X/2/2fd150d889f4f7ab1de804a9346c6874abe4fcc1.png)  
This example doesn’t work because Icinga converts “_service.vars.tags contains iftype=prod_” to “_prod"=service.vars.tags contains_”. I.e. it parses “equal” character as an operator. Any suggestions on how to escape it.

---

<div class="post-metadata">

**Author:** ![Heilig](https://community.icinga.com/letter_avatar_proxy/v4/letter/h/ba8739/32.png) [@Heilig](https://community.icinga.com/u/Heilig)\
**Post date:** [October 19, 2021, 1:14pm UTC](https://community.icinga.com/t/escape-equals-operator-in-notification-apply-rule/8471/2 "2021-10-19T13:14:53Z")

</div>

I tried several workarounds, e.g. ASCII character in octal encoding, regex, etc.:  
_“iftype\075prod” in service.vars.tags_  
_“iftype\75prod” in service.vars.tags_  
_“iftype+prod” in service.vars.tags_  
\*"iftype._prod" in service.vars.tags_  
_“iftype\Wprod” in service.vars.tags_

It doesn’t work. Icinga doesn’t match “iftype=prod” tag.

It works if I replace “=” with another symbol in service and apply rule (e.g. “iftype:prod”).

Is it possible to escape “=” symbol in notification apply rules? Is this bug?
