# Regular expression format in user\_alert.conf

**URL:** <https://community.f5.com/t/regular-expression-format-in-user-alert-conf/74684>\
**Category:** Technical Forums\
**Tags:** icall, alert, bgp\
**Created:** [June 20, 2024, 3:59pm UTC](https://community.f5.com/t/regular-expression-format-in-user-alert-conf/74684 "2024-06-20T15:59:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shepardce](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/shepardce/32/18221_2.png) [@shepardce](https://community.f5.com/u/shepardce)\
**Post date:** [June 20, 2024, 3:59pm UTC](https://community.f5.com/t/regular-expression-format-in-user-alert-conf/74684/1 "2024-06-20T15:59:15Z")

</div>

I’m trying to use iCall and an event from user\_alert.conf to fail over a BIG-IP VE cluster if an arbitrary BGP neighbor goes down. I have the handler and script working just fine if the event only looks in my logs for a static phrase, but when I have it look for a regex instead, it no longer works. However, if I test in a tool like regex101 with my expression and a log entry, it matches just fine.

Here’s my user\_alert.conf (sanitized of course)

```auto
alert bgp_neighbor_down "neighbor 100.200.[0-9]{1,3}.[0-9]{1,3} Down" {
        exec command="tmsh generate sys icall event neighbordown context { { name protocol value bgp } }"
}

```

And one of the logs I’m trying to match on:

```auto
2024/06/20 15:04:32 informational: BGP : %BGP-5-ADJCHANGE: neighbor 100.200.30.4 Down BGP Notification CEASE

```

If I then run&nbsp;_imish_ and shut down a neighbor that should match that regex, the device I’m on stays active.

Any thoughts on what else I can try?

---

<div class="post-metadata">

**Author:** ![zamroni777](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/zamroni777/32/1473_2.png) [@zamroni777](https://community.f5.com/u/zamroni777)\
**Post date:** [June 23, 2024, 5:05am UTC](https://community.f5.com/t/regular-expression-format-in-user-alert-conf/74684/2 "2024-06-23T05:05:07Z")

</div>

“.” means any character in regex.

replace it with \x02E

> **[ascii(7) - Linux manual page](https://man7.org/linux/man-pages/man7/ascii.7.html)**

[https://www.tcl.tk/man/tcl8.4/TclCmd/re\_syntax.htm#M41](https://www.tcl.tk/man/tcl8.4/TclCmd/re_syntax.htm#M41)
