# Help streams-rules

**URL:** <https://community.graylog.org/t/help-streams-rules/18669>\
**Category:** Graylog Central (peer support)\
**Created:** [February 3, 2021, 1:29pm UTC](https://community.graylog.org/t/help-streams-rules/18669 "2021-02-03T13:29:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rodrigobuch](https://avatars.discourse-cdn.com/v4/letter/r/94ad74/32.png) [@rodrigobuch](https://community.graylog.org/u/rodrigobuch)\
**Post date:** [February 3, 2021, 1:29pm UTC](https://community.graylog.org/t/help-streams-rules/18669/1 "2021-02-03T13:29:56Z")

</div>

Hi

I’m trying to set up streams, to search my vsftp server log, but my regular expressions don’t work.

I tried to do it this way:  
message must match regular expression. (quality).  
message must match regular expression (? i). \* 4bio-quality. \*

But streams rules always bring the wrong research  
Wed Feb 3 10:02:12 2021 [pid 12017] [4bio-quality] OK LOGIN: Client “:: ffff: 66.70.176.89”  
Wed Feb 3 09:29:59 2021 [pid 861] [usj] OK UPLOAD: Client “:: ffff: 201.48.118.121”, “/ OTHERS / OTHERS\_23259\_12503132369\_ANTONIO DE OLIVEIRA NASCIMENTO \_\_\_ 04052005\_WORKIMAGE\_0002.TIF”, 13251 bytes, 167.3 bytes

Not only bring the messages I want “4bio-quality”

 ![image](https://us1.discourse-cdn.com/flex016/uploads/graylog/original/2X/3/3c9f23e05b3b7f8363aaf08caaba00021c663096.png)

---

<div class="post-metadata">

**Author:** ![shoothub](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/shoothub/32/6412_2.png) [@shoothub](https://community.graylog.org/u/shoothub)\
**Post date:** [February 4, 2021, 3:03pm UTC](https://community.graylog.org/t/help-streams-rules/18669/2 "2021-02-04T15:03:27Z")

</div>

Your regex is wrong. You use unsupported regex, graylog uses java regex syntax and don’t know `(?i)`. If you want to only find text in message, you can simply use `message contains` condition.

To test regex, use java online regex like this one:  
[https://www.freeformatter.com/java-regex-tester.html](https://www.freeformatter.com/java-regex-tester.html)

---

<div class="post-metadata">

**Author:** ![rodrigobuch](https://avatars.discourse-cdn.com/v4/letter/r/94ad74/32.png) [@rodrigobuch](https://community.graylog.org/u/rodrigobuch)\
**Post date:** [February 4, 2021, 5:14pm UTC](https://community.graylog.org/t/help-streams-rules/18669/3 "2021-02-04T17:14:07Z")

</div>

Hi

I had tested it with the freeformatter and it works, but not on Graylog.

I’m setting it up this way

![image](https://us1.discourse-cdn.com/flex016/uploads/graylog/original/2X/e/ea4a9ec533c91ebbb1ee7395d9af89ed4a35c7a9.png)

---

<div class="post-metadata">

**Author:** ![frantz](https://avatars.discourse-cdn.com/v4/letter/f/dbc845/32.png) [@frantz](https://community.graylog.org/u/frantz)\
**Post date:** [February 8, 2021, 3:40pm UTC](https://community.graylog.org/t/help-streams-rules/18669/4 "2021-02-08T15:40:24Z")

</div>

As suggested by shoothub, why do you use a regex if you only need to check if logs contain the string “4bio-quality” ?  
If you really want to use a regex, I would use [4bio-quality]  
If sometimes it’s uppercase you can use (?i)[4bio-quality]  
I have already tested (?i) and it works in Graylog.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/graylog/original/3X/c/7/c7c09c6b5099570133d6502b83f50ba4430de5b6.png) [@system](https://community.graylog.org/u/system)\
**Post date:** [February 22, 2021, 3:41pm UTC](https://community.graylog.org/t/help-streams-rules/18669/5 "2021-02-22T15:41:14Z")

</div>

Closed on February 22, 2021, 3:41pm UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
