Splunk Search

RegEx Square Brackets not supported?

svercelli
Path Finder

Using rex and it seems as if Splunk sees the open square bracket as the beginning of a subsearch. Have I written this wrong or is there a workaround

| rex \w+\.\w+\.\w+[a-z]\_(?<Facility>[[:alnum:]]+)
0 Karma
1 Solution

alemarzu
Motivator

Hi there,

Missing quotes perhaps, | rex "\w+\.\w+\.\w+[a-z]\_(?<Facility>[[:alnum:]]+)"

View solution in original post

alemarzu
Motivator

Hi there,

Missing quotes perhaps, | rex "\w+\.\w+\.\w+[a-z]\_(?<Facility>[[:alnum:]]+)"

svercelli
Path Finder

Yep, worked, I feel a bit silly.

0 Karma

alemarzu
Motivator

Glad it worked. It happens all the time!!

0 Karma
Get Updates on the Splunk Community!

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI!Discover how Splunk’s agentic AI ...

Splunk Enterprise Security 8.x: The Essential Upgrade for Threat Detection, ...

Watch On Demand the Tech Talk on November 6 at 11AM PT, and empower your SOC to reach new heights! Duration: ...

Splunk Observability as Code: From Zero to Dashboard

For the details on what Self-Service Observability and Observability as Code is, we have some awesome content ...