# Regular expression behavior

**URL:** <https://community.zeek.org/t/regular-expression-behavior/2391>\
**Category:** Zeek\
**Created:** [August 4, 2012, 12:45pm UTC](https://community.zeek.org/t/regular-expression-behavior/2391 "2012-08-04T12:45:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fahad\_Ali\_Arshad](https://avatars.discourse-cdn.com/v4/letter/f/b5e925/32.png) [@Fahad\_Ali\_Arshad](https://community.zeek.org/u/Fahad_Ali_Arshad)\
**Post date:** [August 4, 2012, 12:45pm UTC](https://community.zeek.org/t/regular-expression-behavior/2391/1 "2012-08-04T12:45:24Z")

</div>

Hi,  
I am testing some regular expression in bro and Bro2.0 is giving me weird behavior. For example, the following regular expression puts Bro in an infinite loop.

/(merge._?using\s_?()|execute\s\*?immediate\s\*["’`´\x2018\x2019])|(\W+\d\*?\s\*?having\s\*?[^\s-])|(match\s\*?[\w(),+-]+\s\*?against\s\*?()/

Note that the \x2018 and \x2019 are ASCII codes for LEFT SINGLE QUOTATION MARK and RIGHT SINGLE QUOTATION MARK.

If I plug in the actual single quotation marks then I get a segmentation fault.

Any idea what is going on?

Best,  
Fahad Arshad

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/zeek/original/1X/f09d732bc2cc7c7cc7e35db67cf4e1d5233ce7a7.png) [@system](https://community.zeek.org/u/system)\
**Post date:** [May 6, 2022, 3:40pm UTC](https://community.zeek.org/t/regular-expression-behavior/2391/2 "2022-05-06T15:40:29Z")

</div>

Closed on May 6, 2022, 3:40pm UTC


